jvm-testing

Apply JUnit 5, Mockito, AssertJ, and Testcontainers patterns to Java projects.

9|1|Updated Jun 16, 2026
One-click install
npx skills add https://github.com/AratKruglik/antigravity-sdlc --skill jvm-testing-aratkruglik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jvm-testing
Source: https://github.com/AratKruglik/antigravity-sdlc/tree/main/plugins/java-foundation/skills/jvm-testing
Command: npx skills add https://github.com/AratKruglik/antigravity-sdlc --skill jvm-testing-aratkruglik

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

JUnit 5, Mockito, AssertJ, and Testcontainers patterns for any JVM project. Covers test structure, parameterised tests, mocking discipline, fluent assertions, and integration testing with real containers. Stack-agnostic — referenced by every Java plugin in the marketplace.

Use this skill to:

  • Write clear, maintainable unit tests with JUnit 5.
  • Mock dependencies with Mockito without overusing mocks.
  • Write expressive assertions with AssertJ.
  • Spin up real infrastructure (DBs, message brokers) with Testcontainers for integration tests.

Do NOT use this skill for:

  • Spring-specific test slices (@SpringBootTest, @WebMvcTest, @DataJpaTest — those are in spring-boot-plugin skills).
  • Framework-specific mocking utilities (MockMvc, WebTestClient).

Quick Start

Tell the AI to apply JVM testing patterns (JUnit 5, Mockito, AssertJ, Testcontainers) to a Java project to establish consistent, high-quality tests.

Frequently Asked Questions about jvm-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize JVM tests across multiple Java projects?

You can standardize JVM tests by applying stack-agnostic patterns for JUnit 5, Mockito, AssertJ, and Testcontainers across Java projects. This approach ensures consistent unit, parameterised, and integration testing without tying your tests to a specific framework.

What's the best way to mock dependencies in Java without overusing mocks?

The best way to mock dependencies without overusing them is to apply Mockito mocking discipline. This skill guides you toward targeted mocking practices that prevent brittle tests and maintain expressive assertions using AssertJ.

Can I use Testcontainers for integration testing in any JVM application?

Yes, you can use Testcontainers for integration testing in any JVM application. This skill covers spinning up real infrastructure like databases and message brokers to run reliable integration tests across stack-agnostic Java projects.

Does this JVM testing skill support Spring-specific test slices like @WebMvcTest?

No, this JVM testing skill explicitly excludes Spring-specific test slices like @SpringBootTest, @WebMvcTest, and @DataJpaTest. Those framework-specific testing utilities are handled by dedicated spring-boot-plugin skills instead.

Why should I use AssertJ for assertions in my JVM tests?

You should use AssertJ for assertions in your JVM tests to write expressive, fluent assertions that improve test readability. This skill incorporates AssertJ alongside JUnit 5 and Mockito to establish high-quality, standardized testing patterns.