Agent skill

131 Java Testing Unit Testing

by jabrena in jabrena/plinth

A skill your agent uses 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…

Apache-2.0Auto-check passedTesting & QA

Install 131 Java Testing Unit Testing

skills CLI
$ npx skills add jabrena/plinth --skill 131-java-testing-unit-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jabrena/plinth 131-java-testing-unit-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jabrena/plinth.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/131-java-testing-unit-testing .claude/skills/131-java-testing-unit-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
131-java-testing-unit-testing
GitHub stars
446
Token cost
~902 tokens
SKILL.md length
315 words
Files
2 (incl. references)
Skills in repo
124
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses 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…

  • You need to review
  • SKILL.md covers Constraints, When to use this skill, Workflow and Reference
  • Calls mvn
  • Write Java unit tests — including migrating from JUnit 4 to JUnit 5

What it does

131 Java Testing Unit Testing is an agent skill from jabrena/plinth. 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 trigger for requests…

Its SKILL.md is about 900 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/131-java-testing-unit-testing.md`).

It sits in Testing & QA, covering Unit testing. It works with Java, JUnit and Bicep. The repository describes itself as: Plinth is an AI-native engineering toolkit for modern Java enterprise SDLC, built around reusable Commands, Agents, Skills, and MCP Servers. The licence is Apache-2.0.

When your agent uses it

  • You need to review
  • Write Java unit tests — including migrating from JUnit 4 to JUnit 5
  • Adopting AssertJ for fluent assertions
  • Structuring tests with Given-When-Then

Example prompts

  • “/131-java-testing-unit-testing”

What it can do on your machine

Read from SKILL.md and the folder at commit dca88dc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • mvn

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

131 Java Testing Unit Testing loads about 902 tokens when it runs, and up to ~8.8k if it reads all its reference files. Until then it costs about 197 tokens; SKILL.md has 315 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~197
When it runs · the whole SKILL.md, loaded when a task matches
~902
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jabrena/plinth at commit dca88dc, republished under its Apache-2.0 licence (© jabrena). 315 words, ~902 tokens.

Download SKILL.mdSave it as .claude/skills/131-java-testing-unit-testing/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
131-java-testing-unit-testing
description
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 trigger for requests such as Review Java code for unit tests; Apply best practices for unit tests in Java code; Write fast JUnit unit tests for Java code; Improve Mockito-based Java unit tests; Refactor Java tests to isolate collaborators. Part of Plinth Toolkit
license
Apache-2.0
metadata.author
Juan Antonio Breña Moral
metadata.version
0.19.0

Java Unit testing guidelines

Review and improve Java unit tests using modern JUnit 5, AssertJ, and Mockito best practices.

What is covered in this Skill?

  • JUnit 5 annotations: @Test, @BeforeEach, @AfterEach, @DisplayName, @Nested, @ParameterizedTest
  • AssertJ fluent assertions: assertThat, assertThatThrownBy
  • Given-When-Then test structure, descriptive test naming, single-responsibility tests
  • Test independence and isolated state
  • Parameterized tests: @ValueSource/@CsvSource/@MethodSource
  • Mockito dependency mocking: @Mock, @InjectMocks, MockitoExtension
  • Code coverage guidance (JaCoCo), package-private test visibility
  • Testing anti-patterns: reflection, shared state, hard-coded values, testing implementation details
  • Error handling: assertThatThrownBy, exception messages
  • JSpecify null-safety: @NullMarked, @Nullable
  • 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

When to use this skill

  • Review Java code for unit tests
  • Apply best practices for unit tests in Java code
  • Write fast JUnit unit tests for Java code
  • Improve Mockito-based Java unit tests
  • Refactor Java tests to isolate collaborators

Workflow

  1. Compile project before unit-test changes

Run ./mvnw compile or mvn compile and stop immediately if compilation fails.

  1. Read unit-testing reference and evaluate coverage

Read references/131-java-testing-unit-testing.md and identify modernization and quality gaps in current tests.

  1. Apply unit-testing best practices

Implement or refactor tests using JUnit 5, AssertJ, Mockito, parameterization, and stronger boundary checks.

  1. Verify with full build

Run ./mvnw clean verify or mvn clean verify after applying improvements.

Reference

For detailed guidance, examples, and constraints, see references/131-java-testing-unit-testing.md.

© jabrena, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/131-java-testing-unit-testing of jabrena/plinth.

  • SKILL.md
  • references/131-java-testing-unit-testing.md

Open the folder on GitHubat commit dca88dc

Compare with similar skills

131 Java Testing Unit Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

131 Java Testing Unit Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
131 Java Testing Unit Testing this skilljabrena/plinth446—~902Automated safety check: PassApache-2.0
Debug Surefireeclipse-rdf4j/rdf4j420—~2.4kAutomated safety check: PassBSD-3-Clause
Minecraft TestingJahrome907/minecraft-agent-skills166—~3.8kAutomated safety check: PassMIT
Eclipse Testgradusnikov/eclipse-chatgpt-plugin171—~1kAutomated safety check: PassMIT
Unit TestingLeavesfly/Jimi237—~667Automated safety check: PassNone
Migrate Junit Source To TabletestDataDog/dd-trace-java736—~950Automated safety check: PassApache-2.0

Similar skills

  • Debug Surefire

    eclipse-rdf4j/rdf4j

    Debug Maven Surefire unit tests by running them in JDWP "wait for debugger" mode (-Dmaven.surefire.debug) and attaching to the forked test JVM using jdb (preferred for CLI/agent debugging)…

    420 GitHub stars~2.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Minecraft Testing

    Jahrome907/minecraft-agent-skills

    Design and implement automated tests for current Minecraft 26.x or legacy 1.21.x mods and plugins using JUnit, MockBukkit, NeoForge Game Tests, or Fabric Game Tests.

    166 GitHub stars~3.8k tokensUpdated 25 days ago
    Testing & QAAuto-check passed
  • Eclipse Test

    gradusnikov/eclipse-chatgpt-plugin

    Run JUnit tests in Eclipse projects — all tests, by package, by class, or individual test methods.

    171 GitHub stars~1k tokensUpdated 10 days ago
    Testing & QAAuto-check passed
  • Unit Testing

    Leavesfly/Jimi

    Java单元测试编写指南(基于JUnit和Mockito)

    237 GitHub stars~667 tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Official

    Convert JUnit 5 @MethodSource/@CsvSource/@ValueSource parameterized tests to @TableTest (JDK8)

    736 GitHub stars~950 tokensUpdated today
    Testing & QAAuto-check passed
  • Test Analysis Extensions

    microsoft/testfx

    Official

    Provides file paths to language-specific reference files for the test ANALYSIS skills (assertion-quality, test-anti-patterns, test-gap-analysis, test-smell-detection, test-tagging).

    1k GitHub starsUsed in 2 repos~1.1k tokens
    Testing & QAAuto-check passed

More from jabrena/plinth

All 124 skills in this repo
  • A skill your agent uses when you need to add or review fuzz testing for Java APIs with CATS — including contract-driven negative testing, malformed payload validation, boundary input exploration, CI…

    446 GitHub stars~874 tokensUpdated today
    Auto-check passed
  • A skill your agent uses when you need to generate Java project diagrams — including UML sequence diagrams, UML class diagrams, C4 model diagrams, UML state machine diagrams, UML Deployment Diagrams…

    446 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • A skill your agent uses when you need to add or configure Maven plugins in your pom.xml — including quality tools (enforcer, surefire, failsafe, jacoco, pitest, spotbugs, pmd), security scanning…

    446 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • A skill your agent uses when you need to set up JMeter performance testing for a Java project — including creating the run-jmeter.sh script from the exact template, configuring load tests with…

    446 GitHub stars~842 tokensUpdated today
    Auto-check passed
  • A skill your agent uses when you need to set up Java application profiling to detect and measure performance issues — including trusted preinstalled async-profiler v4.x setup, problem-driven…

    446 GitHub stars~903 tokensUpdated today
    Auto-check passed
  • A skill your agent uses when you need to generate a checklist document with embedded commands inventory, following the embedded template exactly and producing INVENTORY-COMMANDS-JAVA.md in the…

    446 GitHub stars~697 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about 131 Java Testing Unit Testing

What does 131 Java Testing Unit Testing do?

A skill your agent uses 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…. 131 Java Testing Unit Testing is an agent skill from jabrena/plinth. 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.

When should I use 131 Java Testing Unit Testing?

131 Java Testing Unit Testing fits situations like: you need to review; write Java unit tests — including migrating from JUnit 4 to JUnit 5; adopting AssertJ for fluent assertions; structuring tests with Given-When-Then.

How do I install 131 Java Testing Unit Testing in Claude Code?

Run `npx skills add jabrena/plinth --skill 131-java-testing-unit-testing -a claude-code`. Or copy the skill folder (skills/131-java-testing-unit-testing in jabrena/plinth) into .claude/skills/131-java-testing-unit-testing in your project. Claude Code loads it when a task matches its description.

How do I install 131 Java Testing Unit Testing in Codex?

Run `npx skills add jabrena/plinth --skill 131-java-testing-unit-testing -a codex`. Or copy the skill folder (skills/131-java-testing-unit-testing in jabrena/plinth) into .agents/skills/131-java-testing-unit-testing in your project. Codex loads it when a task matches its description.

Can I use 131 Java Testing Unit Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jabrena/plinth --skill 131-java-testing-unit-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/131-java-testing-unit-testing, .gemini/skills/131-java-testing-unit-testing, .github/skills/131-java-testing-unit-testing and .opencode/skills/131-java-testing-unit-testing in your project.

What does 131 Java Testing Unit Testing need to run?

Going by SKILL.md and its folder, 131 Java Testing Unit Testing needs the command-line tools its instructions call (mvn).

Does 131 Java Testing Unit Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is 131 Java Testing Unit Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does 131 Java Testing Unit Testing use?

131 Java Testing Unit Testing is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does 131 Java Testing Unit Testing use?

About 902 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.9k tokens, read only when the agent opens those files.

What are the alternatives to 131 Java Testing Unit Testing?

Skills that share tags, products or a category with 131 Java Testing Unit Testing: Debug Surefire (eclipse-rdf4j/rdf4j, 420 stars), Minecraft Testing (Jahrome907/minecraft-agent-skills, 166 stars), Eclipse Test (gradusnikov/eclipse-chatgpt-plugin, 171 stars) and Unit Testing (Leavesfly/Jimi, 237 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains 131 Java Testing Unit Testing?

jabrena (a GitHub user) maintains it in jabrena/plinth, which has 446 GitHub stars. The repository holds 124 skills in this directory. The repository was last updated on October 7, 2026.

Source: jabrena/plinth on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.