RaceResultsService : It should allow clients to subscribe (which means they start receiving messages), It should allow subscribers to unsubscribe (which means they stop receiving messages), Every time a new message comes, it should be sent to all subscribers.

We shall test RaceResultsService (the SUT) and make sure it sends messages to the right subscribers (DOCs)

First of all, we have to have an object of class RaceResultsService (our SUT). Then, we must create a Client type which can subscribe, unsubscribe and receive messages (objects of this type will play the role of DOCs). We will also need a Message type, which will be being passed from the race results service to subscribed clients.