{"id":"bbd6dcf7-a1e0-45b8-8de3-cce43eaa1623","shortId":"S2ATHN","kind":"skill","title":"521-frameworks-micronaut-testing-unit-tests","tagline":"Use when you need to write unit tests for Micronaut applications — Mockito-first with @ExtendWith(MockitoExtension.class), @MicronautTest with @MockBean, HttpClient @Client(/) assertions, @Property overrides, @ParameterizedTest, and *Test vs *IT naming. For framework-agnostic Jav","description":"# Micronaut Unit Testing\n\nApply fast testing strategies for Micronaut: Mockito-first, narrow @MicronautTest when HTTP or DI replacement is required.\n\n**What is covered in this Skill?**\n\n- Pure JUnit 5 + Mockito without container boot\n- @MicronautTest with @MockBean factory methods for collaborators\n- HttpClient blocking exchanges against the embedded server\n- @Property for deterministic configuration in tests\n- @ParameterizedTest with @CsvSource / @MethodSource\n- Naming: *Test → Surefire; *IT → Failsafe when configured\n- When to escalate to `@522`\n\n**Scope:** Apply recommendations based on the reference rules and good/bad code examples.\n\n## Constraints\n\nCompile before test refactors; verify the full suite after.\n\n- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change\n- **SAFETY**: If compilation fails, stop immediately\n- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements\n- **BEFORE APPLYING**: Read the reference for detailed rules and examples\n- **EDGE CASE**: If request scope is ambiguous, stop and ask a clarifying question before applying changes\n- **EDGE CASE**: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance\n\n## When to use this skill\n\n- Add or improve unit tests in a Micronaut project\n- Reduce unnecessary @MicronautTest usage with Mockito-first tests\n\n## Workflow\n\n1. **Read reference and assess project context**\n\nRead `references/521-frameworks-micronaut-testing-unit-tests.md` and inspect the current project setup before proposing changes.\n\n2. **Gather scope and decide target improvements**\n\nIdentify requested outcomes, constraints, and the minimum safe set of changes to apply.\n\n3. **Apply framework-aligned changes**\n\nImplement or refactor configuration/code following the reference patterns and project conventions.\n\n4. **Run verification and report results**\n\nExecute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/521-frameworks-micronaut-testing-unit-tests.md](references/521-frameworks-micronaut-testing-unit-tests.md).","tags":["521","frameworks","micronaut","testing","unit","tests","cursor","rules","java","jabrena","agent-skills","ai-skills"],"capabilities":["skill","source-jabrena","skill-521-frameworks-micronaut-testing-unit-tests","topic-agent-skills","topic-ai-skills","topic-claude","topic-claude-code","topic-claude-code-skills","topic-claude-code-subagents","topic-claude-skills","topic-cursor-agent","topic-cursor-ai","topic-cursor-skills","topic-cursorai","topic-github-copilot"],"categories":["cursor-rules-java"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/jabrena/cursor-rules-java/521-frameworks-micronaut-testing-unit-tests","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add jabrena/cursor-rules-java","source_repo":"https://github.com/jabrena/cursor-rules-java","install_from":"skills.sh"}},"qualityScore":"0.631","qualityRationale":"deterministic score 0.63 from registry signals: · indexed on github topic:agent-skills · 362 github stars · SKILL.md body (2,226 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-26T12:53:39.316Z","embedding":null,"createdAt":"2026-04-18T22:02:28.107Z","updatedAt":"2026-04-26T12:53:39.316Z","lastSeenAt":"2026-04-26T12:53:39.316Z","tsv":"'/mvnw':138,155 '1':237 '2':255 '3':275 '4':292 '5':73 '521':1 '522':113 'action':313 'add':218 'agnost':42 'align':279 'ambigu':181 'appli':47,115,144,163,166,189,274,276 'applic':18 'appropri':299 'ask':184,206 'assert':30 'assess':241 'base':117 'block':86 'boot':77 'build/tests':300 'case':176,192 'chang':146,190,254,272,280,304 'clarifi':186 'clean':156,160 'client':29 'code':124 'collabor':84 'compil':127,139,142,149 'configur':95,108 'configuration/code':284 'constraint':126,265,320 'contain':76 'context':243 'convent':291 'cover':67 'csvsourc':100 'current':249 'decid':259 'detail':171,316 'determinist':94 'di':61 'edg':175,191 'embed':90 'escal':111 'exampl':125,174,318 'exchang':87 'execut':298 'extendwith':23 'factori':81 'fail':150 'failsaf':106 'fast':48 'file':196 'first':21,55,234 'follow':285,311 'follow-up':310 'framework':3,41,278 'framework-agnost':40 'framework-align':277 'frameworks-micronaut-testing-unit-test':2 'full':133 'gather':256 'good/bad':123 'guidanc':212,317 'http':59 'httpclient':28,85 'identifi':262 'immedi':152 'implement':281 'improv':164,220,261 'input':195 'inspect':247 'jav':43 'junit':72 'mandatori':136 'method':82 'methodsourc':101 'micronaut':4,17,44,52,225 'micronauttest':25,57,78,229 'minimum':268 'miss':200,204 'mockbean':27,80 'mockito':20,54,74,233 'mockito-first':19,53,232 'mockitoextension.class':24 'mvn':141,159 'name':38,102 'narrow':56 'need':11 'outcom':264 'overrid':32 'parameterizedtest':33,98 'pattern':288 'proceed':209 'project':226,242,250,290 'properti':31,92 'propos':253 'pure':71 'question':187 'read':167,238,244 'recommend':116 'reduc':227 'refactor':130,283 'refer':120,169,239,287,314 'references/521-frameworks-micronaut-testing-unit-tests.md':245,322,323 'replac':62 'report':201,296 'request':178,263 'requir':64,194 'result':297 'rule':121,172 'run':137,154,293 'safe':269 'safeti':147 'scope':114,179,257 'see':321 'server':91 'set':270 'setup':211,251 'skill':70,217 'skill-521-frameworks-micronaut-testing-unit-tests' 'source-jabrena' 'stop':151,182 'strategi':50 'suit':134 'summar':302 'surefir':104 'target':260 'test':5,7,15,35,46,49,97,103,129,222,235 'tool':198 'topic-agent-skills' 'topic-ai-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-code-skills' 'topic-claude-code-subagents' 'topic-claude-skills' 'topic-cursor-agent' 'topic-cursor-ai' 'topic-cursor-skills' 'topic-cursorai' 'topic-github-copilot' 'unit':6,14,45,221 'unnecessari':228 'usag':230 'use':8,215 'verif':294 'verifi':131,153,157,161,307 'vs':36 'whether':207 'without':75 'workflow':236 'write':13","prices":[{"id":"0364beea-317e-446d-ae52-a97a96cef848","listingId":"bbd6dcf7-a1e0-45b8-8de3-cce43eaa1623","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"jabrena","category":"cursor-rules-java","install_from":"skills.sh"},"createdAt":"2026-04-18T22:02:28.107Z"}],"sources":[{"listingId":"bbd6dcf7-a1e0-45b8-8de3-cce43eaa1623","source":"github","sourceId":"jabrena/cursor-rules-java/521-frameworks-micronaut-testing-unit-tests","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/521-frameworks-micronaut-testing-unit-tests","isPrimary":false,"firstSeenAt":"2026-04-18T22:02:28.107Z","lastSeenAt":"2026-04-26T12:53:39.316Z"}],"details":{"listingId":"bbd6dcf7-a1e0-45b8-8de3-cce43eaa1623","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"521-frameworks-micronaut-testing-unit-tests","github":{"repo":"jabrena/cursor-rules-java","stars":362,"topics":["agent-skills","ai-skills","claude","claude-code","claude-code-skills","claude-code-subagents","claude-skills","cursor-agent","cursor-ai","cursor-skills","cursorai","github-copilot","intellij-idea","java","prompting","system-prompts"],"license":"apache-2.0","html_url":"https://github.com/jabrena/cursor-rules-java","pushed_at":"2026-04-26T12:50:01Z","description":"A curated and opinionated collection of Skills and Agents to be used in modern SDLC workflows for Java Enterprise development with your favorite AI Agent harness.","skill_md_sha":"63759c3f71bafc2bc402fefde85827dd13d26f65","skill_md_path":"skills/521-frameworks-micronaut-testing-unit-tests/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/521-frameworks-micronaut-testing-unit-tests"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"521-frameworks-micronaut-testing-unit-tests","license":"Apache-2.0","description":"Use when you need to write unit tests for Micronaut applications — Mockito-first with @ExtendWith(MockitoExtension.class), @MicronautTest with @MockBean, HttpClient @Client(/) assertions, @Property overrides, @ParameterizedTest, and *Test vs *IT naming. For framework-agnostic Java use @131-java-testing-unit-testing. This should trigger for requests such as Add or improve unit tests in a Micronaut project; Reduce unnecessary @MicronautTest usage with Mockito-first tests. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/521-frameworks-micronaut-testing-unit-tests"},"updatedAt":"2026-04-26T12:53:39.316Z"}}