EventDispatcher implements EventAPI { @Override public void addListener(Listener listener, Enum<?>... eventTypes) { add(listener, ImmutableSet.copyOf(eventTypes), eventTypes.length == 0); } EventDispatcher(Set<Enum<?>> supportedEventTypes);  EventDispatcher(Enum<?>... supportedEventTypes); void dispatchEvent(Event e); void safeDispatchEvent(Event e); @Override void addListener(Listener listener, Enum<?>... eventTypes); @Override void addListener(Listener listener,
      Iterable<? extends Enum<?>> eventTypes); @Override void removeListener(Listener listener, Enum<?>... eventTypes); @Override void removeListener(Listener listener,
      Iterable<? extends Enum<?>> eventTypes); @Override boolean containsListener(Listener listener, Enum<?> eventType); boolean hasListenerFor(Enum<?> eventType); EventAPI getPublicEventAPI();  }
@Test(expected = IllegalArgumentException.class) public void addListenerFail3() { dispatcher.addListener(l1, OTHER_EVENT1); }
@Test(expected = NullPointerException.class) public void addListenerFail6() { dispatcher.addListener(l1, new Enum<?>[] {EVENT2, null, EVENT3}); }