Provides patterns for testing utility classes, static methods, and helper functions. Validates pure functions, null handling, edge cases, and boundary conditions. Generates AssertJ assertions and @ParameterizedTest for string utils, math utils, validators, and collection helpers.
SkillScore95Maintained
Automatic
◆QA & Test Engineering pack
Last verified 8/21/2026
What it changes
Passed 21 of 22 test cases with the skill, and 7 of 22 without it.
Without skill32%
With skill95%
Checks it passed that the model alone missed
Uses AssertJ `assertThat` for assertion checks.
Test method names begin with the `should` prefix.
Uses AssertJ `isTrue` to verify valid URL inputs.
and 12 more in the full report
14 fixed7 passed either way1 still failing0 broke
Pass-rate lift
+64 pp
Tokens
+48%
Agent turns
0%
Response time
-26%
Model gemini-3.6-flashMeasured 8/21/2026v121 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 14 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 14
Prompt
Write a unit test class for `CollectionUtils.join(List<String> items, String delimiter)` testing joining elements `['a', 'b', 'c']` with delimiter `'-'`.
What was checked, without and with the skill
Checked
Without skill
With skill
Verifies joined string result using AssertJ `isEqualTo`.
Missed
Passed
Declares no mock objects in the test class.
Passed
Passed
case-22 · gemini-3.6-flash · 8/21/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md231 lines3 files
Unit Testing Utility Classes and Static Methods
Overview
This skill generates tests for utility classes with static helper methods and pure functions. It provides patterns for testing null handling, edge cases, boundary conditions, and common utilities like string manipulation, calculations, data validation, and collections. Pure functions require no mocking.
When to Use
Use this skill when:
Writing tests for utility/helper classes with static methods
Testing pure functions with no state or side effects
Testing string manipulation, formatting, or transformation utilities
Testing calculation, conversion, or math helper functions
Testing data validation and formatter utilities
Verifying null/empty input handling in utility code
Testing collections or array helper methods
Instructions
Create test class: Name it after the utility (e.g., StringUtilsTest)
Test happy path: Valid inputs with expected outputs
Test edge cases: null, empty, whitespace, single elements
Test boundary conditions: max/min values, large numbers, precision
Use descriptive names: shouldCapitalizeFirstLetter instead of test1
Use AssertJ: For readable, chainable assertions
Use @ParameterizedTest: For multiple similar inputs (see references/parameterized-tests.md)