A test of an event dispatcher using the Stream API in Dart