Unit testing REST controllers helps catch bugs early. This skill shows how to use MockMvc and @WebMvcTest to test your API endpoints without starting the whole server. You can check request and response mapping, validation, and error handling in isolation.
With these patterns, you test one controller at a time. You mock the services it depends on. Then you send mock HTTP requests and verify the responses. This makes your tests fast and reliable.
Anyone building Spring Boot APIs will find this useful. It saves time by finding issues before deployment. Your code becomes more stable and easier to change.
Global
mkdir -p ~/.claude/skills/unit-test-controller-layerProject
mkdir -p .claude/skills/unit-test-controller-layerSource Repository
Grill Memattpocock/skills
Stress-test your plan with relentless questions until we both understand
Tddmattpocock/skills
Write one test at a time then code to make it pass
Test Driven Developmentobra/superpowers
Write a failing test first then code just enough to pass
Qamattpocock/skills
Turn bug reports into GitHub issues through natural conversation without technical fuss
Migrate To Shoehornmattpocock/skills
Replace unsafe as assertions with type-safe partial test data easily
Webapp Testinganthropics/skills
Test your local web apps quickly with Playwright automation and screenshots
Playwright Best Practicescurrents-dev/playwright-best-practices-skill
Master Playwright testing with best practices for reliable and fast tests
Google Agents Cli Evalgoogle/agents-cli
Run evaluations on your AI agent, find failures, and improve its quality step by step