Better Assertions with AssertJ
summary
Shows how AssertJ fluent chaining and features like recursive comparison, .actual(), custom domain assertions, and soft assertions produce far clearer failure messages than plain JUnit or Hamcrest. Demonstrates automated migration paths: JUnit4/Vintage → JUnit Jupiter/JUnit 6 and Hamcrest → AssertJ, plus Spring MVC Hamcrest conversions. Uses tooling—OpenRewrite recipes driven by Google Error Prone-style templates—with 1,000+ automated rules that run in roughly a single compile cycle to apply safe, project-wide assertion upgrades.
AI-written summary · about
chapters (12)
- 0:00Introduction and motivation
- 3:46Live demo setup
- 5:58Problems with missing tests
- 6:19Outdated assertion patterns
- 13:01Legacy test structures
- 16:51Hamcrest vs modern assertions
- 20:43AssertJ features and benefits
- 25:13Advanced AssertJ techniques
- 31:11Soft assertions explained
- 34:21Automated migration to AssertJ
- 37:09Spring and AssertJ integration
- 38:33Sustaining test quality








