
unit-test-service-layer
Provides patterns for unit testing service layer with Mockito
by giuseppe-trisciuoglioFree
Description
unit-test-service-layer is an agent skill from the developer-kit collection for unit testing @Service classes in Java with Mockito. It shows how to mock repository calls and external API clients, verify that the service calls its collaborators as expected, test exception scenarios, and stub external responses. The result is isolated tests that run without a Spring container or a database, so they stay fast. The skill is organized as a workflow with checkpoints, starting with the setup of the test class. Use it when you want to test business logic in a service, check error handling and edge cases, or write a unit test that does not touch real infrastructure. Because the tests use mocks, they check what the service does with its collaborators rather than the behavior of a real database. The skill is free. Its page shows about 4.0K installs and 371 GitHub stars for the repository, and its audits show Gen Agent Trust Hub, Socket and Snyk all at Pass.…
Highlights
- Mockito tests for @Service classes
- Mocked repository and external client calls
- Verifies method invocations
- Exception and edge case tests
- No Spring container or database needed
Ratings & Reviews
No ratings yet
Be the first to rate unit-test-service-layer.
People also visit

unit-test-wiremock-rest-api
Provides patterns for unit testing external REST APIs using WireMock
unit-test-service-layer FAQ
What does the unit-test-service-layer skill do?
It guides an agent in writing isolated Mockito tests for Java service classes, with mocked repositories and external clients.
Does it need a database?
No. The page says the tests run without a Spring container or a database, and without real API calls.
How do I install it?
Run: npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill unit-test-service-layer
What do the security audits say?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best unit-test-service-layer alternatives?
Popular alternatives to unit-test-service-layer include unit-test-controller-layer, dart-generate-test-mocks and unit-test-scheduled-async. See all unit-test-service-layer alternatives








