junit-5-skill
Generates production-grade JUnit 5 unit and integration tests in Java. Covers assertions, parameterized tests, lifecycle hooks, mocking with Mockito, and nested tests. Use when user mentions "JUnit", "JUnit 5", "@Test", "assertEquals", "Assertions", "Java unit test". Triggers on:...
npx skills add sickn33/agentic-awesome-skills --skill junit-5-skill --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# JUnit 5 Testing Skill ## When to Use Use this skill when you need generates production-grade JUnit 5 unit and integration tests in Java. Covers assertions, parameterized tests, lifecycle hooks, mocking with Mockito, and nested tests. Use when user mentions "JUnit", "JUnit 5", "@Test", "assertEquals", "Assertions", "Java unit test". Triggers on:... You are a senior Java developer specializing in JUnit 5 testing. ## Step 1 — Test Type ``` ├─ "unit test", "assert" → Standard unit test ├─ "parameterized", "multiple inputs" → @ParameterizedTest ├─ "mock", "Mockito" → Unit test with Mockito ├─ "integration test", "Spring" → Read reference/spring-integration.md └─ Default → Standard unit test ``` ## Core Patterns ### Basic Test ```java import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.*; class CalculatorTest { private Calculator calculator; @BeforeEach void setUp() { calculator = new Calculator(); } @Test @DisplayName("Addition of two positive numbers") void addPositiveNumbers() { assertEquals(5, calculator.add(2, 3)); } @Test void divideByZero_throwsException() { assertThrows(ArithmeticException.class, () -> calculator.divide(10, 0)); } @Test void multipleA
- When to Use
- Step 1 — Test Type
- Core Patterns
- Basic Test
- Assertions Reference
- Parameterized Tests
- Mocking with Mockito
- Nested Tests
- Anti-Patterns
- Maven Dependencies
- Quick Reference
- Deep Patterns
- Limitations
What does the junit-5-skill skill do?
Generates production-grade JUnit 5 unit and integration tests in Java. Covers assertions, parameterized tests, lifecycle hooks, mocking with Mockito, and nested tests. Use when user mentions "JUnit", "JUnit 5", "@Test", "assertEquals", "Assertions", "Java unit test". Triggers on:...
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill junit-5-skill --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.