Backward compatibility keeps existing external clients usable after internal changes by preserving the communication contract between applications. Messages, service calls, and parameter structures must remain understandable to systems that evolve on different deployment cycles. section 5.3 section 5.4
Apply the requirement according to where communication crosses the system boundary:
- Verify inter-system communication with mocks or spies because emitted messages and external calls form observable behavior. section 5.3
- Mock the last stage before an unmanaged dependency leaves the application; this preserves the external format while resisting internal refactoring. section 9.1
- Treat communication with an application-only database as an implementation detail; change its schema or storage mechanism without preserving its internal protocol. section 5.4
- Avoid mocking collaborations between internal classes, because preserving those calls couples tests to implementation details rather than client-visible behavior. section 5.3
Testing a message contract at the system edge
A controller sends an email-change event through IMessageBus, which formats it for IBus. Testing IMessageBus verifies an intermediate collaboration; injecting a mock IBus instead verifies the final message—"Type: USER EMAIL CHANGED; Id: ...; NewEmail: ..."—and therefore protects the external contract. A handwritten BusSpy can record messages and expose readable assertions for message count and structure.

















