
Unit Test Controller Layer
Patterns for unit testing REST controllers with MockMvc, covering status codes, validation, and error handling.
- skills.sh installs
- 4K
- GitHub stars
- 372
- last updated
- Aug 21, 2026
What it does
- Covers standalone MockMvc setup with mocked services for GET, POST, PUT, and DELETE endpoints in isolation
- Includes examples for query parameters, path variables, validation failures, response headers, authorization headers, and content negotiation
- Guides test-driven debugging with
.andDo(print())to compare actual and expected results when assertions fail - Designed for Spring MVC projects that need web layer tests without loading the full application context
Install
$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-controller-layer -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Unit Testing REST Controllers with MockMvc
Overview
Provides patterns for unit testing @RestController and @Controller classes using MockMvc. Covers request/response handling, HTTP status codes, request parameter binding, validation, content negotiation, response headers, and exception handling with mocked service dependencies.
When to Use
Use for: controller tests, API endpoint testing, Spring MVC tests, mock HTTP requests, unit testing web layer endpoints, verifying REST controllers in isolation.
Instructions
Details
- Repository
- github.com/giuseppe-trisciuoglio/developer-kit
- Category
- Testing & QA
- First seen
- May 16, 2026
More from giuseppe-trisciuoglio/developer-kit
All 95- Unit Test Json Serialization4K
- Spring Boot Saga Pattern3.9K
- Nextjs Data Fetching3.9K
- Spring Data Neo4j3.9K
- Unit Test Security Authorization3.9K
- Nx Monorepo3.9K
- Langchain4j Spring Boot Integration3.9K
- Langchain4j Tool Function Calling Patterns3.9K
- Langchain4j Rag Implementation Patterns3.9K
- Unit Test Scheduled Async3.9K
- Rag3.9K
- Unit Test Utility Methods3.9K
- Qdrant3.9K
- Unit Test Exception Handler3.9K
- Unit Test Mapper Converter3.9K
- Langchain4j Ai Services Patterns3.9K
- Unit Test Caching3.9K
- Unit Test Config Properties3.9K
- Unit Test Application Events3.9K
- Langchain4j Vector Stores Configuration3.9K
- Langchain4j Mcp Server Patterns3.9K
- Aws Sdk Java V2 S33.9K
- Langchain4j Testing Strategies3.9K
- Aws Sdk Java V2 Dynamodb3.9K
Similar to Unit Test Controller Layer
More Testing & QA
unit-test-exception-handlerSkillgiuseppe-trisciuoglio/developer-kit3.9K installsSpring Boot unit-test patterns for @ExceptionHandler and @ControllerAdvice using standalone MockMvc setups.
unit-test-service-layerSkillgiuseppe-trisciuoglio/developer-kit4K installsMockito-based unit test patterns for @Service classes that isolate business logic from databases and external APIs.
springboot-tddSkillaffaan-m/ecc6.2K installsTest-driven workflow for Spring Boot services using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo.
api-testing-observability-api-mockSkillsickn33/agentic-awesome-skills451 installsAPI mocking framework that simulates real API behavior, error shapes, and latency for parallel development and testing.
302-frameworks-spring-boot-restPluginjabrena/plinth462 starsUse when you need to design, review, or improve REST APIs with Spring Boot — including HTTP methods, resource URIs, status codes, DTOs, versioning, deprecation
api-testing-patternsSkillproffesor-for-testing/agentic-qe615 installsComprehensive API test patterns covering contract, component, and integration levels with agent-assisted validation.