Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Reviews, improves, and writes Java unit tests using JUnit 5, AssertJ, Mockito, and JSpecify null-safety practices.
Use this skill ↓95% 91%−5 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 21 of 22 without it.
3 of 3 safety checks passed
Not used yet
Review and improve Java unit tests using modern JUnit 5, AssertJ, and Mockito best practices.
What is covered in this Skill?
@Test, @BeforeEach, @AfterEach, @DisplayName, @Nested, @ParameterizedTestassertThat, assertThatThrownBy@ValueSource/@CsvSource/@MethodSource@Mock, @InjectMocks, MockitoExtensionassertThatThrownBy, exception messages@NullMarked, @NullableScope: The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.
Before applying any unit test changes, ensure the project compiles. If compilation fails, stop immediately — do not proceed until resolved. After applying improvements, run full verification.
./mvnw compile or mvn compile before applying any change./mvnw clean verify or mvn clean verify after applying improvementsSkills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.