@Test
void on() {

    final FooEventConsumer eventConsumer = new FooEventConsumer();
    instance.on(FooEvent.class, eventConsumer);
    final List<Event> events = Arrays.asList(new FooEvent(), new BarEvent());
    final List<Event> expected = events.stream().filter(FooEvent.class::isInstance).collect(Collectors.toList());
    expected.forEach(instance::notify);
    assertEquals(expected, eventConsumer.events());
}