In JUnit 5 there is a new abstract: @Nested.
@Nested
I understand how this works, I understand why we use a nested class, I just donโt understand why we need to have a nested test class in our test.
Annotation @Nestedallows you to have an inner class, which is essentially a test class, allowing you to group several test classes under the same parent (with the same initialization).
. "" , . "", .
. , .
@Nested , .
Ruby. Java Junit 4 hirarchicalcontextrunner. . https://github.com/bechte/junit-hierarchicalcontextrunner/wiki.