Mastering Java Testing With JUnit, Mockito, and AssertJ in IntelliJ IDEA
summary
Shows concrete JUnit 5 techniques: parameterized tests with CSV and method sources, lazy failure messages via assertion suppliers, assertAll with executables, per-class lifecycle and parallel test execution — all demonstrated running against real HTTP APIs (JsonPlaceholder and an “people in space” gateway) so the examples actually execute. Shows Mockito for stubs vs mocks, spies, argument matchers and Mockito verify interactions (including throwing exceptions and verifying calls), and AssertJ for readable map/assertion checks; examples compile and run inside IntelliJ IDEA.
AI-written summary · about
chapters (14)
- 0:00Introduction and setup
- 1:27JUnit 5 architecture
- 4:26JUnit 5 lifecycle and naming
- 6:18Advanced JUnit 5 features
- 9:21JUnit 5 assertions
- 16:59Parameterized testing examples
- 21:45Parallel testing and lifecycle
- 28:03Introduction to Mockito
- 31:51Mockito example: API gateway
- 37:42Mocks vs stubs and verification
- 45:03Mockito annotations and BDD
- 48:00Mockito spies
- 50:48Mockito advanced features
- 55:55AssertJ and conclusion
related talks
45mHow to Write Tests in 2021
57mJUnit 5's Best Features
59mJava Testing Part 2: Mocks, Stubs, and Spies with Mockito 4
57mModern Testing Tools for Java Developers
46mModern Testing Tools for Java Developers
13mAssertJ Like a Pro
31mModern Testing Tools for Java Developers
01h 05mJava Testing Part 1: JUnit Jupiter and AssertJ
