How to return Mocks from Mocks
This shows How to mock our a more complicated api, and trigger events from one system and make sure
things happen to another system based on those events. It also demonstrates how to return a mock from a mock which is very useful in testing complex apis such as jdk's nio subsystem.
This example consists of three example tests on one system. The files for the test and the system are the following....