marketplace/bundles/pm-dev-java/skills/junit-core/SKILL.md
JUnit 5 core testing patterns with AAA structure, test organization, and coverage standards
npx skillsauth add cuioss/plan-marshall junit-coreInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
REFERENCE MODE: This skill provides reference material. Load specific standards on-demand based on current task.
JUnit 5 testing standards for general Java projects. This skill covers test structure, naming conventions, coverage requirements, and the AAA (Arrange-Act-Assert) pattern.
This skill applies to Java projects using JUnit 5:
org.junit.jupiter:junit-jupiter (JUnit 5)Important: Load this standard for any testing work.
Read: standards/testing-junit-core.md
This provides foundational rules for:
assertAll, assertInstanceOf, assertDoesNotThrow)Integration Testing (load for IT work):
Read: standards/testing-integration.md
Use when: Writing or reviewing integration tests (*IT.java). Covers naming, separation, and lifecycle.
Async Testing (load for async/concurrent code):
Read: standards/testing-async-patterns.md
Use when: Testing asynchronous behavior. Covers Awaitility patterns (never Thread.sleep).
Coverage Analysis (load for coverage work):
Read: standards/coverage-analysis-pattern.md
Use when: Analyzing test coverage or improving coverage metrics.
// CORRECT - At least one test class per production class
// TokenValidator.java → TokenValidatorTest.java
// UserService.java → UserServiceTest.java
@Test
@DisplayName("Should validate token with correct issuer")
void shouldValidateTokenWithCorrectIssuer() {
var issuer = Generators.nonBlankStrings().next();
var token = createTokenWithIssuer(issuer);
var result = validator.validate(token);
assertTrue(result.isValid(), "Token should be valid");
assertEquals(issuer, result.getIssuer(), "Issuer should match");
}
@Test
@DisplayName("Should parse all token claims")
void shouldParseAllTokenClaims() {
var token = createValidToken();
var claims = parser.parse(token);
assertAll("Token claims",
() -> assertNotNull(claims.getSubject(), "Subject should be present"),
() -> assertInstanceOf(Instant.class, claims.getExpiry(), "Expiry should be Instant"),
() -> assertFalse(claims.getRoles().isEmpty(), "Roles should not be empty")
);
}
plan-marshall:dev-general-module-testing - Language-agnostic testing principlespm-dev-java:junit-integration - Maven integration testingpm-dev-java-cui:cui-testing - CUI test generator frameworkpm-dev-java:java-core - Core Java patternsUnit test class — starting point for new test classes:
Read: templates/unit-test-class.java.tmpl
Replace ${PACKAGE}, ${CLASS_UNDER_TEST}, ${METHOD_1}, and placeholder comments with actual values.
| Standard | Purpose | |----------|---------| | testing-junit-core.md | Test structure, AAA pattern, assertions, nesting | | testing-integration.md | Integration test naming, separation, lifecycle | | testing-async-patterns.md | Awaitility patterns (never Thread.sleep) | | coverage-analysis-pattern.md | Coverage analysis and gap improvement |
tools
Plan-marshall-domain implementor of the ext-self-review-{domain} extension point. Surfaces deterministic candidates (regexes, user-facing strings, markdown sections, symmetric-pair functions, flag-guard pairs, contract sources, schema-bearing files) for pre-submission structural self-review.
development
The single shared contract every untrusted-external-content ingestion surface loads — reader/orchestrator/writer isolation, the deterministic validator script as the containment boundary, and the output-schema discipline for candidate structs parsed from web pages, GitHub issue/PR/comment bodies, and Sonar issue messages
development
Domain-invariant recipe for deliberate wide-scope simplification campaigns across a scope x thoroughness cell, with a T4+ relation-graph pre-deliverable
testing
A test skill for README generation