@Test public void shouldNotTriggerEventListenerForEvent2IfEventListenerIsNull() throws Exception { externalEventTrigger.trigger(Event.ERROR, null, null); verify(eventListener, times(0)).onEvent(Event.ERROR, null, null); }
public <T> void trigger(Event1<T> event, T payload) { if (eventListener != null) { eventListener.onEvent(event, payload); } }
ExternalEventTrigger { public <T> void trigger(Event1<T> event, T payload) { if (eventListener != null) { eventListener.onEvent(event, payload); } } }
ExternalEventTrigger { public <T> void trigger(Event1<T> event, T payload) { if (eventListener != null) { eventListener.onEvent(event, payload); } }  }
ExternalEventTrigger { public <T> void trigger(Event1<T> event, T payload) { if (eventListener != null) { eventListener.onEvent(event, payload); } }  void trigger(Event1<T> event, T payload); void trigger(Event2<T1, T2> event, T1 payload1, T2 payload2); void registerEventListener(EventListener eventListener); }
ExternalEventTrigger { public <T> void trigger(Event1<T> event, T payload) { if (eventListener != null) { eventListener.onEvent(event, payload); } }  void trigger(Event1<T> event, T payload); void trigger(Event2<T1, T2> event, T1 payload1, T2 payload2); void registerEventListener(EventListener eventListener);  }