@Nested and @DisplayName

@Nested groups the tests of a single context in inner classes to structure the suite, and @DisplayName gives a class or a test a readable name in reports. They improve readability without changing the behavior of the tests.

Example

@DisplayName("Retrait")
@Nested
class Retrait {
    @Test void refuseSiSoldeInsuffisant() {}
}

Related concepts

The whole glossary