This gives you the Mockito and JUnit 5 boilerplate for testing Spring service classes without spinning up a container or hitting a database. It covers the standard patterns: mocking repositories with @Mock and @InjectMocks, stubbing return values with when().thenReturn(), verifying interactions, and testing exception paths. The arrange-act-assert structure with validation checkpoints is practical, and the warnings about not mocking DTOs or mixing argument matchers are things people actually get wrong. Use this when you need to test business logic in isolation and want fast feedback loops. The examples are straightforward repository and email service scenarios that map to real codebases.
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill unit-test-service-layer