This skill helps you implement robust REST integration tests using Quarkus, RestAssured, Mockito, and Testcontainers for reliable end-to-end validation.
npx playbooks add skill emvnuel/skill.md --skill testing-patterns
Write integration tests for REST endpoints using Quarkus test framework.
---
Basic REST integration test with RestAssured:
@QuarkusTest
class OrderResourceTest {
@Test
void shouldCreateOrder() {
given()
.contentType(ContentType.JSON)
.body("""
{
"customerId": "cust-123",
"items": [{"productId": "prod-1", "quantity": 2}]
}
""")
.when()
.post("/orders")
.then()
.statusCode(201)
.body("id", notNullValue())
.body("status", equalTo("PENDING"));
}
}
---
Use: Test full request/response cycle through REST layer
Stack: @QuarkusTest + RestAssured
Cookbook: [rest-integration-tests.md](./cookbook/rest-integration-tests.md)
Use: Isolate tests from external HTTP services, queues, etc.
Stack: @InjectMock with Mockito
Cookbook: [mocking-dependencies.md](./cookbook/mocking-dependencies.md)
Use: Test against real PostgreSQL/MySQL
Stack: Quarkus DevServices or @Testcontainers
Cookbook: [testcontainers-setup.md](./cookbook/testcontainers-setup.md)
Use: Fast in-memory alternative when container not needed
Stack: H2 with test profile
Cookbook: [h2-setup.md](./cookbook/h2-setup.md)
Use: Test with exact JSON payloads (no object serialization)
Stack: Text blocks + JsonPath assertions
Cookbook: [json-request-bodies.md](./cookbook/json-request-bodies.md)
Use: Organize tests with JUnit 5 features
Stack: @Nested, @BeforeEach, naming conventions
Cookbook: [test-structure.md](./cookbook/test-structure.md)
---
| Pattern | When to Use | Key Annotation/Tool |
| ------------------- | ------------------------------ | ----------------------- |
| REST Integration | Test endpoint behavior | @QuarkusTest |
| Mock Dependencies | Isolate from external services | @InjectMock |
| Testcontainers | Need real database behavior | DevServices / Container |
| H2 In-Memory | Fast tests, simple queries | %test profile |
| Raw JSON Bodies | Exact payload control | Text blocks |
| Nested Test Classes | Group related scenarios | @Nested |
---
Core Testing: [REST Integration Tests](./cookbook/rest-integration-tests.md) · [Test Structure](./cookbook/test-structure.md)
Dependencies: [Mocking Dependencies](./cookbook/mocking-dependencies.md)
Database: [Testcontainers Setup](./cookbook/testcontainers-setup.md) · [H2 Setup](./cookbook/h2-setup.md)
Request/Response: [JSON Request Bodies](./cookbook/json-request-bodies.md)
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.