Use when you need to review, improve, or write Java unit tests — including migrating from JUnit 4 to JUnit 5, adopting AssertJ for fluent assertions, structuring tests with Given-When-Then, ensuring test independence, applying parameterized tests, mocking dependencies with Mockito, verifying boundary conditions (RIGHT-BICEP, CORRECT, A-TRIP), leveraging JSpecify null-safety annotations, or eliminating testing anti-patterns such as reflection-based tests or shared mutable state. This should trigg
NewMaintained
Automatic
◆QA & Test Engineering pack
Last verified 8/20/2026
What it changes
Passed 18 of 20 test cases with the skill, and 19 of 20 without it.
Without skill95%
With skill91%
Checks it passed that the model alone missed
Recommends running mvn compile or ./mvnw compile before making any code modifications.
1 fixed19 passed either way0 still failing2 broke
Pass-rate lift
-5 pp
Tokens
+9%
Agent turns
0%
Response time
-30%
Model gemini-3.6-flashMeasured 8/20/2026v120 of 22 cases passed with skill · 20 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
You are refactoring the test suite for a Java project using Maven. You plan to immediately rewrite several assertions in UserServiceTest.java. What build step must you execute before modifying any test files, and how should you proceed if that step fails?
What was checked, without and with the skill
Checked
Without skill
With skill
Recommends running mvn compile or ./mvnw compile before making any code modifications.
Missed
Passed
States that execution must stop immediately if compilation fails.
Passed
Passed
case-01 · gemini-3.6-flash · 8/20/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md58 lines2 files
Java Unit testing guidelines
Review and improve Java unit tests using modern JUnit 5, AssertJ, and Mockito best practices.
RIGHT-BICEP coverage principles, A-TRIP test quality, CORRECT boundary condition verification
Scope: The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.
Constraints
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.
MANDATORY: Run ./mvnw compile or mvn compile before applying any change
SAFETY: If compilation fails, stop immediately and do not proceed — compilation failure is a blocking condition
VERIFY: Run ./mvnw clean verify or mvn clean verify after applying improvements
BEFORE APPLYING: Read the reference for detailed examples, good/bad patterns, and constraints
Use when you need to refactor Java code to adopt modern Java features (Java 8+) — including migrating anonymous classes to lambdas, replacing Iterator loops with Stream API, adopting Optional for null safety, switching from legacy Date/Calendar to java.time, using collection factory methods, applying text blocks, var inference, or leveraging Java 25 features like flexible constructor bodies and module import declarations. This should trigger for requests such as Review Java code for modern Java