Testing Anti-Patterns Overview Tests must verify real behavior, not mock behavior. Mocks are a means to isolate, not the thing being tested. Core principle: Test what the code does, not what the mocks do. Following strict TDD prevents these anti-patterns. The Iron Laws Anti-Pattern 1: Testing Mock Behavior The violation: Why this is wrong: - You're verifying the mock works, not that the component works - Test passes when mock is present, fails when it's not - Tells you nothing about real behavior your human partner's correction: "Are we testing the behavior of a mock?" The fix: Gate Function…