What problem does it solve?
This Skill provides a structured approach to writing high-quality unit tests for the CIA platform using JUnit 5, Mockito, and AssertJ, ensuring tests are readable, deterministic, and maintainable while targeting 80%+ code coverage.
Core Features & Use Cases
- AAA Test Structure: Arrange, Act, and Assert patterns to keep tests clear and predictable.
- Mocking & Verification: Effective use of Mockito to isolate units and verify interactions.
- Fluent Assertions: Using AssertJ for expressive, readable test assertions.
- Coverage Goals: Guidance and examples aimed at achieving 80%+ line coverage and 70% branch coverage.
- Use Case: Apply these patterns to service layer validation, data validation, and utility routines across the CIA codebase.
Quick Start
Use the unit-testing-patterns skill to scaffold a PoliticianServiceTest with Mockito mocks and AssertJ assertions, following the AAA structure.