~/talk

Better Assertions with AssertJ

Talkat Spring I/O 2025 · 2025-05-22..05-23· [testing]
slides:none on file

Argues that AssertJ fluent assertions replace terse JUnit/Hamcrest failures with expressive chained checks, custom assertion providers, soft assertions and clearer exception testing; shows concrete migrations using OpenRewrite migration recipes (sample app reports ~1 hour saved) and a GitHub Action that posts one‑click code suggestions; demonstrates replacing Hamcrest collection checks, collapsing chained asserts, and adopting Spring Framework 6.2 / MockMvcTester for unified assertions (MockMvcTester support), and reports these automated changes work on the demo repo.

AI-written summary · about

  1. 0:00Introduction to AssertJ
  2. 4:14Better assertions in testing
  3. 13:48History of Java assertion libraries
  4. 22:37Why AssertJ improves older libraries
  5. 26:12Favorite AssertJ features
  6. 27:39Custom assertion providers
  7. 32:58Soft assertions and failure messages
  8. 35:07Migrating to AssertJ with OpenRewrite
  9. 39:00AssertJ with Spring MockMVC
  10. 41:50Enforcing AssertJ patterns
  11. 45:25Implementing AssertJ automation rules
  12. 46:31Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.