A test can check the result or check the conversation between objects

In Fowler’s warehouse example, a state-based test checks whether an order was filled and inventory changed. A behavior-based test checks whether the order made the expected calls to its collaborator. Both can use substitute objects, but they verify different things.

A stub supplies prepared answers; a mock also establishes expected interactions. The choice affects design and maintenance because a test tied closely to calls can break when internal collaboration changes even if the public result remains correct.

Fowler does not reduce the issue to one universally superior tool. He distinguishes verification style from the broader philosophy of test-driven development. The essay remains useful when a team says it needs more mocks without first agreeing on what evidence the test should provide.