spring-junit
CommunityShip robust JUnit 5 tests for Spring Boot.
Authorzenobiuszeto
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides a comprehensive, opinionated testing guide and conventions to eliminate flaky tests, poor coverage, and inconsistent test practices in a Java 21 + Spring Boot 3.x banking platform so teams can deliver reliable, production-ready code with clear test responsibilities.
Core Features & Use Cases
- Layered Testing Guidance: Clear rules for unit tests, controller slices (@WebMvcTest), JPA slices (@DataJpaTest), full integration tests (@SpringBootTest) and architecture tests (ArchUnit).
- Tooling & Conventions: Prescribes JUnit 5 Jupiter, Mockito 5, AssertJ, MockMvc/WebTestClient, Testcontainers, EmbeddedKafka, JaCoCo 80% coverage gate, and the TestDataFactory pattern.
- Best Practices: Enforces naming conventions, single-assertion-per-test, BDDMockito given/then style, static Testcontainers usage, exclusion rules for JaCoCo, and use of @Captor for saved-entity verification.
- Use Case: Use these guidelines to create reliable unit tests for services, slice tests for controllers and repositories, and integration tests that validate Flyway migrations, Kafka consumers, and real database interactions.
Quick Start
Generate JUnit 5 unit and integration tests for AccountService and AccountController using Mockito, AssertJ, @WebMvcTest, and Testcontainers following the naming, TestDataFactory, and single-assertion conventions.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: spring-junit Download link: https://github.com/zenobiuszeto/banking-strawman-capabilities/archive/main.zip#spring-junit Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.