@SuppressWarnings({"unchecked", "serial"}) @Test void testPublish() { testSubject.publish("Event1"); verify(mockEventBus).publish( argThat((GenericEventMessage msg) -> msg.getPayload().equals("Event1"))); verify(mockEventMessageTransformer).handle( argThat((GenericEventMessage msg) -> msg.getPayload().equals("Event1"))); testSubject.publish("Event2", "Event3"); verify(mockEventBus).publish( argThat((GenericEventMessage msg) -> msg.getPayload().equals("Event2"))); verify(mockEventMessageTransformer).handle( argThat((GenericEventMessage msg) -> msg.getPayload().equals("Event2"))); verify(mockEventBus).publish( argThat((GenericEventMessage msg) -> msg.getPayload().equals("Event3"))); verify(mockEventMessageTransformer).handle( argThat((GenericEventMessage msg) -> msg.getPayload().equals("Event3"))); }
@Override public void publish(List<?> events) { events.forEach(this::publish); }
DefaultEventGateway extends AbstractEventGateway implements EventGateway { @Override public void publish(List<?> events) { events.forEach(this::publish); } }
DefaultEventGateway extends AbstractEventGateway implements EventGateway { @Override public void publish(List<?> events) { events.forEach(this::publish); } protected  DefaultEventGateway(Builder builder); }
DefaultEventGateway extends AbstractEventGateway implements EventGateway { @Override public void publish(List<?> events) { events.forEach(this::publish); } protected  DefaultEventGateway(Builder builder); static Builder builder(); @Override void publish(List<?> events); }
DefaultEventGateway extends AbstractEventGateway implements EventGateway { @Override public void publish(List<?> events) { events.forEach(this::publish); } protected  DefaultEventGateway(Builder builder); static Builder builder(); @Override void publish(List<?> events);  }