With mocks our tests set up an object, exercise it,
and check that it interacted with the mock(s) the way we expected.
State or interaction: this may be confusing. After all, when we asserted against FakeTransactionLog's little buffers, we asserted on its state.But how were those buffers filled? Ahhhhhh, yes: they record the history of how DepositAction interacted with FakeTransactionLog.DepositAction may have some state, but in this case we care about (and assert on) its interactions.A mock is the ideal tool when we care about an object's interactions: which methods were called, what parameters were passed,
and so on.
Mock objects check the interaction between collaborating objects.