Last couple of weeks I'm constantly trying to sell Mockito to everybody around. I find it the only mocking* framework for TTDing. However in discussions like EasyMock vs Mockito, expecting vs spying, strict vs nice and so on I was really missing good arguments. I could tell you many things about rigidity and fragility of tests, about maintainability and so on but a strong feeling that it's not all wasn't leaving me.
Today, when looking for a reason why expect-run-verify frameworks gained such a big popularity and what was driving them, I finally found that argument and it has a name - Endotesting. Read the paper, it's very interesting.
The intent of endotesting, and a solution called Mock Objects had a good intention. Those guys back at 2000's were facing issues with discovering bad indirect interactions in complex systems and they really needed a tool to find them fast. A tool that will fail at exact place where unwanted or improper interaction is met. Stack traces were invaluable, mock had to be strict as it could be the only way to discover unwanted operations on your objects or subsytems. The mock object they imagined(and yes, needed) is a kind of endoscope to find breakages in internal organs.
Hey! is this really the tool we need today? No, no and no. Problems we are solving with unit testing nowadays totally differ from those ten years ago. How hard is it to find a breakage in one to twenty LOC unit you're testing compared to complex ensemble of object interactions in systems written ten years back? Even more, in context of Test-First Development a breakage usually means that your code is simply not created yet or you messed around with assumptions; when your expected interaction under injected object doesn't happen you normally can find the issue in seconds.
Now it's time to answer yourself open and honest - do you really read stack traces of test failures that often? If you do - you're not writing your test before code, start doing it right now!
The thing I want to make clear, is that I do think concepts of Mock Objects and strict test are really important and usable, but on some higher level, say, Integration Testing.
* Mockito isn't really a mocking framework but for simplicity we can call it so, right?