Making the Jump to JUnit 5
summary
Walks through migrating JUnit 4 to JUnit 5 on Spring Boot (requires Java 8+, Spring Boot 2.4+), showing concrete edits: org.junit.jupiter.api package, extendWith replaces RunWith, converting @Before to @BeforeEach and using assertThrows lambda instead of expected, replacing Mockito runner with MockitoExtension, and adding @DisplayName and @ParameterizedTest with @CsvFileSource. Uses an H2-backed REST app, runs Maven clean test, and shows tests increase from 9 to 11 when parameterized CSV rows are added; the converted code and build run cleanly.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:38Upgrade to JUnit 5
- 3:01JUnit 5 architecture
- 5:25Spring upgrade path
- 8:11Live migration
- 15:14New JUnit 5 features
- 21:53Resources








