O'Reilly logo
  • Feilim Deffely thinks this is interesting:

How do you test that one object communicates correctly with another? Have the object under test communicate with the test case instead of with the object it expects.

From

Cover of Test Driven Development: By Example

Note

Why would you do this ? why not just check the object representing the green bar ?