mellor-tdd-java

Provides TDD frameworks, patterns, and chapter references from Mellor's Test-Driven Development with Java.

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/zademy/book-to-skill-zademy --skill mellor-tdd-java-zademy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mellor-tdd-java
Source: https://github.com/zademy/book-to-skill-zademy/tree/main/.agents/skills/mellor-tdd-java
Command: npx skills add https://github.com/zademy/book-to-skill-zademy --skill mellor-tdd-java-zademy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Java developers practicing test-driven development often lack a structured reference for applying TDD rhythms, hexagonal architecture, test doubles, and SOLID principles consistently across domain, database, and web layers. ## Core Features & Use Cases - Core Frameworks Reference: Instant access to Red-Green-Refactor, triangulation, FIRST principles, test pyramid, hexagonal architecture, and stub-vs-mock decision rules. - Chapter-Level Deep Dives: Fifteen indexed chapter summaries covering JUnit 5, AssertJ, Mockito, DBRider, JDBI, and composition root wiring, retrievable by topic or chapter number. - Cheatsheet & Glossary: Decision tables, test pyramid ratios, smell detectors, and definitions for quick consultation during coding sessions. - Use Case: While building a Spring or plain Java service test-first, ask how to structure a database adapter integration test and receive the DBRider pattern with @DataSet setup from chapter 14. ## Quick Start Ask the agent to explain Mellor's triangulation technique or to load chapter ch09 on hexagonal architecture for your current Java TDD task.

Frequently Asked Questions about mellor-tdd-java

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply Red-Green-Refactor in Java TDD?▼

Write one failing test expressing the desired behavior, then write the minimal code to pass it, then refactor both test and production code while staying green. Hardcoding is legal in the green phase; triangulation with a second test forces real generalization.

What is the difference between a stub and a mock in Mockito?▼

A stub provides pre-canned return values using when/thenReturn and is the default choice for data flow. A mock verifies interactions using verify() and should be used sparingly for protocol verification, since over-mocking couples tests to call sequences.

How does hexagonal architecture help with unit testing?▼

Hexagonal architecture places the domain model at the center with ports as interfaces and adapters as implementations. This lets you mock ports and run FIRST unit tests of complete user stories without touching databases or HTTP.

Should I use inside-out or outside-in TDD for Java?▼

Mellor's synthesis recommends inside-out (Chicago school) for the domain layer where logic is pure, and outside-in (London school) for the adapter layer where user value and wiring matter. Hexagonal architecture draws the boundary between them.

What are the limitations of this TDD knowledge base?▼

The skill covers only the book's content and does not execute code or integrate with your project tooling. For hands-on implementation, combine it with project-specific tools and your own build environment.