The system under test (SUT) is the class, component, or larger unit whose behavior a test exercises and verifies. In unit-testing discussions, its boundary depends on the testing school: the London school centers on one class, while the classical school centers on one meaningful unit of behavior. section 2.1 section 2.5
Treat the SUT as a testing boundary, not automatically as the smallest code artifact:
- Isolate the SUT from collaborators with test doubles when following the London style; this separates the class's behavior from external influence. section 2.1
- Keep relevant collaborators intact under the classical style, replacing shared dependencies only when they could make tests affect one another. section 2.5
- Prefer a unit of behavior that expresses a meaningful domain outcome over a test aimed narrowly at one class or implementation detail. section 2.3 section 2.5
Testing a purchase
A classical test constructs a customer and store, performs a shampoo purchase, and verifies success plus remaining inventory. A London-style test replaces the store with a mock, configures inventory availability, and verifies that removal occurs once. Both exercise purchasing behavior, but the second couples the test more closely to the SUT's collaborator interactions.



