Provides edge case, corner case, boundary condition, and limit testing patterns for Java unit tests. Validates minimum/maximum values, null cases, empty collections, numeric overflow/underflow, floating-point precision, and off-by-one scenarios using JUnit 5 and AssertJ.
SkillScore100Maintained
Automatic
◆QA & Test Engineering pack
Last verified 8/21/2026
What it changes
Passed 22 of 22 test cases with the skill, and 16 of 22 without it.
Without skill73%
With skill100%
Checks it passed that the model alone missed
Tests February 29 on leap year 2024
Tests an empty collection created using List.of()
Asserts that LocalDate.MIN evaluates as a valid date boundary
and 4 more in the full report
6 fixed16 passed either way0 still failing0 broke
Pass-rate lift
+27 pp
Tokens
+91%
Agent turns
0%
Response time
-26%
Model gemini-3.6-flashMeasured 8/21/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 6
Prompt
I am testing a Java string validation method using JUnit 5 parameterized testing. Rather than testing standard words like 'hello', what set of empty and whitespace string variants should be supplied in a ValueSource annotation?
What was checked, without and with the skill
Checked
Without skill
With skill
Supplies empty string and whitespace characters in @ValueSource
Missed
Passed
case-05 · 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.md273 lines3 files
Unit Testing Boundary Conditions and Edge Cases
Overview
Systematic patterns for testing boundary conditions, corner cases, and limit values in Java using JUnit 5. Covers numeric boundaries, string edge cases, collection states, floating-point precision, date/time limits, and off-by-one scenarios.
Identify boundaries: List numeric limits (MIN_VALUE, MAX_VALUE, zero), string states (null, empty, whitespace), collection sizes (0, 1, many)
Apply parameterized tests: Use @ParameterizedTest with @ValueSource or @CsvSource for multiple boundary values
Test both sides of boundaries: Cover values just below, at, and just above each boundary
Run tests after adding each boundary category to catch issues early
Verify floating-point precision: Use isCloseTo(expected, within(tolerance)) with AssertJ
Test collection states: Explicitly test empty (0), single (1), and many (>1) element scenarios
Handle overflow/underflow: Use Math.addExact() and Math.subtractExact() to detect arithmetic overflow
Test date/time edges: Verify leap years, month boundaries, timezone transitions
Iterate based on failures: When a boundary test fails, analyze the error to discover additional untested boundaries; add test cases for the newly discovered edge conditions
Provides patterns for unit testing `@ExceptionHandler` and `@ControllerAdvice` in Spring Boot applications. Validates error response formatting, mocks exceptions, verifies HTTP status codes, tests field-level validation errors, and asserts custom error payloads. Use when writing Spring exception handler tests, REST API error tests, or mocking controller advice.