Issue
In JUnit 5, there is a new annotation: @Nested
.
I understand how the annotation works, I understand why we use nested classes, I just don't understand why we need to have nested test classes.
Solution
The @Nested
annotation allows you to have an inner class that's essentially a test class, allowing you to group several test classes under the same parent (with the same initialization).
Answered By - Mureinik