JUnit 5
JUnit 5 Nested Tests: Organizing Complex Test Hierarchies with @Nested
@Nested in JUnit 5 lets you group related tests into inner classes that share setup and describe behavior in structured layers. The result is tests that read like specifications: outer class = component, inner class = context or state, test methods = expected behaviors. This post shows when and how to use @Nested