521-frameworks-micronaut-testing-unit-tests

Installation
SKILL.md

Micronaut Unit Testing

Apply fast testing strategies for Micronaut: Mockito-first, narrow @MicronautTest when HTTP or DI replacement is required.

What is covered in this Skill?

  • Pure JUnit 5 + Mockito without container boot
  • @MicronautTest with @MockBean factory methods for collaborators
  • HttpClient blocking exchanges against the embedded server
  • @Property for deterministic configuration in tests
  • @ParameterizedTest with @CsvSource / @MethodSource
  • Naming: *Test → Surefire; *IT → Failsafe when configured
  • When to escalate to @522

Scope: Apply recommendations based on the reference rules and good/bad code examples.

Constraints

Compile before test refactors; verify the full suite after.

Related skills

More from jabrena/cursor-rules-java

Installs
61
GitHub Stars
380
First Seen
Mar 26, 2026