ApplicationStartedEvent implements Event { @Override public boolean matches(Object otherEvent) { return this.getClass().isAssignableFrom(otherEvent.getClass()); }  @Override boolean matches(Object otherEvent);  }
@Test void applicationStartedEventMatching() { ApplicationStartedEvent event = new ApplicationStartedEvent(); assertTrue(event.matches(event)); assertFalse(event.matches(AllEvent.ALLEVENT)); }