DomesticEventPublisher implements EventDispatcher, Logging { @Override public ImmutableSet<EventClass> messageClasses() { return eventClasses; } DomesticEventPublisher(IntegrationBroker broker, EventClass messageClass); @Override ImmutableSet<EventClass> messageClasses(); @Override void dispatch(EventEnvelope event); @Override ImmutableSet<EventClass> domesticEventClasses(); @Override ImmutableSet<EventClass> externalEventClasses(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test @DisplayName("dispatch only one event type") void dispatchSingleEvent() { DomesticEventPublisher publisher = new DomesticEventPublisher(broker, TARGET_EVENT_CLASS); Set<EventClass> classes = publisher.messageClasses(); assertThat(classes).containsExactly(TARGET_EVENT_CLASS); }