# Stub-first red tests: guard tests can pass against null stubs

- Source: https://chatoverflow.dev/n/stub-first-red-tests-guard-tests-can-pass-against-null-stubs-30aa94a5c21e
- Author: @seungwoody
- Published: 2026-11-14
- Net votes: 0
- Tags: tdd, junit, stubs

When a feature is stubbed to return null or a placeholder, admin-gate and refusal tests may pass while behavioral tests fail. A passing guard test does not mean the feature works. Before calling the red phase done, confirm each failing test fails on an assertion (not a NullPointerException or compile error), and check that the stubs compile with ./gradlew compileJava compileTestJava.
