Skip to content
Skill

Test

Writes and extends JUnit 5 and Mockito tests for Sankhya Addon Studio backends

Test is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
7
Last commit
License
MIT
Listing updated

Similar skills

About Test

This skill guides an agent through writing, reviewing and extending automated backend tests for Sankhya Addon Studio 2.0 projects. It covers a Gradle setup with JUnit 5, Mockito 4.11 for Java 8 projects, AssertJ and mockito-inline, plus templates for service, controller and mapper tests. It also documents static mocking of JapeSession and SessionFile.

The guidance focuses on pitfalls that break tests only on the server or under strict stubbing: checked exceptions thrown by JapeRepository methods, Lombok equals conflicts between stubbed entities, accented characters in exception messages, and UnnecessaryStubbingException in error paths. It also includes patterns for listener tests using real ModifingFields and DynamicVOPojo objects, and for checking CLOB and BLOB field mapping with EntityMapper.fromVO.

The skill expects a Java project with a src/test/java directory and Gradle. Tests run with the Gradle test task before deploying the addon.

When your agent uses it

Escreve, revisa e amplia testes JUnit 5 + Mockito 4.11 para Sankhya Addon Studio — mock de `JapeRepository` via `@Mock`, mock estático de `JapeSession`/`SessionFile` (mockito-inline), fixtures, controllers, services, repositories, mappers. Use ao criar, alterar, revisar ou ampliar cobertura de testes em `src/test/java/`, ao querer garantir que um comportamento, regra ou cálculo do addon não quebre numa mudança futura (regressão) — pedido que não diz "teste" mas pede proteção de código que já existe ("garantir que não quebre quando eu mexer", "não quero que isso regrida", "proteger esse cálculo", "ter segurança pra refatorar") é pedido de teste automatizado e é aqui, mesmo citando regra ou cálculo: as outras skills escrevem a regra, esta trava o comportamento dela; carregue antes de escrever qualquer teste do addon, mesmo simples: teste JUnit escrito de memória erra o stub de `JapeRepository` (`throws Exception` checked) e o mock estático de `JapeSession` —, ao travar o comportamento atual antes de refatorar,

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (19 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the addon-studio plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add snk-devcenter/addon-studio
/plugin install addon-studio@snk-devcenter

Or copy only this skill to ~/.claude/skills/test:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/test &&
cp -R "$tmp/plugins/addon-studio/skills/test" ~/.claude/skills/test &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/test inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/test to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/test &&
cp -R "$tmp/plugins/addon-studio/skills/test" ~/.agents/skills/test &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/test inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/test to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/test &&
cp -R "$tmp/plugins/addon-studio/skills/test" ~/.cursor/skills/test &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/test inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/snk-devcenter/addon-studio.git --path plugins/addon-studio/skills/test

Or copy the folder to ~/.gemini/skills/test yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/test:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/test &&
cp -R "$tmp/plugins/addon-studio/skills/test" ~/.copilot/skills/test &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/test inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git

Then copy addon-studio/plugins/addon-studio/skills/test into your agent's skills folder as test. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Gradle test setup
Provides build file snippets for JUnit 5, Mockito and AssertJ with a readable test logger.
Repository stub rules
Explains which JapeRepository methods throw checked exceptions and how tests must declare them.
Static mocking guidance
Shows how to mock JapeSession and SessionFile static methods with mockito-inline safely.
Listener event tests
Builds persistence events with real ModifingFields and DynamicVOPojo objects for listener checks.
CLOB and BLOB mapping checks
Verifies that entity fields match the types the JAPE layer delivers, without a server.
Common stubbing pitfalls
Covers Lombok equality clashes, strict stubbing errors and accent-safe message assertions.

Good for

  • Write unit tests for a new service class in an Addon Studio backend
  • Add regression tests before refactoring a billing calculation
  • Diagnose a failing test caused by a missing repository stub
  • Check that a listener only updates the fields that changed
  • Verify CLOB and BLOB fields map correctly in an entity

Test FAQ

Which Mockito version does Test recommend and why?

It recommends Mockito 4.11.0 because the project targets Java 8, and Mockito 5.x requires Java 11 or newer.

Do repository test methods need special exception handling?

Yes. JapeRepository methods such as findByPK and save declare throws Exception, so test methods that stub them must declare throws Exception as well.

Can Test mock static SDK classes like JapeSession?

Yes, using mockito-inline with try-with-resources so the static mock is closed after each test.

Does it test against a real database or Wildfly server?

No. It advises keeping unit tests free of real databases, Wildfly or external infrastructure, mocking the service boundaries instead.

How do I install Test in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/test to use it in all your projects, or to .claude/skills/test in one project. Or install the addon-studio plugin, which includes it: /plugin marketplace add snk-devcenter/addon-studio, then /plugin install addon-studio@snk-devcenter.

Does Test run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Test?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Test?

The closest alternatives to Test are Junit 5 skill, Java junit, Spring boot testing, Sankhya utils and Entity.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from snk-devcenter/addon-studio

  1. Adds dynamic search filters to Sankhya entity finders before the query runs

    • Open source
    • 7 GitHub stars
    • Developer tools
  2. Guides writing Sankhya commercial business rules with @BusinessRule for sales documents

    • Open source
    • 7 GitHub stars
    • Enterprise it
  3. Lets agents write, review and refactor Sankhya document callbacks with @Callback hooks

    • Open source
    • 7 GitHub stars
    • Developer tools
  4. Builds and reviews Sankhya REST endpoints with @Controller, DTOs and transactions

    • Open source
    • 7 GitHub stars
    • Developer tools
  5. Sets up global Sankhya exception handlers with rollback, error DTOs and HTTP status

    • Open source
    • 7 GitHub stars
    • Developer tools
  6. Generates Sankhya CRUD screens from table XML in datadictionary/ with no JS or HTML

    • Open source
    • 7 GitHub stars
    • Developer tools