@Test public void testRegisterString() throws Exception { EventLogListener eventLogListener = Mockito.mock(EventLogListener.class); EventLogImpl eventLog = new EventLogImpl(2, 4); eventLog.register(eventLogListener, "com.intuit.wasabi.eventlog.events.EventLogEvent", "SimpleEvent"); Map<EventLogListener, List<Class<? extends EventLogEvent>>> listeners = eventLog.listeners; Assert.assertTrue(listeners.containsKey(eventLogListener)); Assert.assertTrue(listeners.get(eventLogListener).contains(EventLogEvent.class)); Assert.assertTrue(listeners.get(eventLogListener).contains(SimpleEvent.class)); Assert.assertEquals(2, listeners.get(eventLogListener).size()); }
@Override public void register(EventLogListener listener) { register(listener, emptyList()); }
EventLogImpl implements EventLog { @Override public void register(EventLogListener listener) { register(listener, emptyList()); } }
EventLogImpl implements EventLog { @Override public void register(EventLogListener listener) { register(listener, emptyList()); } @Inject  EventLogImpl(@Named("eventlog.threadpoolsize.core") int threadPoolSizeCore,
                        @Named("eventlog.threadpoolsize.max") int threadPoolSizeMax); }
EventLogImpl implements EventLog { @Override public void register(EventLogListener listener) { register(listener, emptyList()); } @Inject  EventLogImpl(@Named("eventlog.threadpoolsize.core") int threadPoolSizeCore,
                        @Named("eventlog.threadpoolsize.max") int threadPoolSizeMax); @Override void register(EventLogListener listener); @Override void register(EventLogListener listener, List<Class<? extends EventLogEvent>> events); @Override @SuppressWarnings("unchecked") void register(EventLogListener listener, String... events); @Override void postEvent(EventLogEvent event); @Override void run(); }
EventLogImpl implements EventLog { @Override public void register(EventLogListener listener) { register(listener, emptyList()); } @Inject  EventLogImpl(@Named("eventlog.threadpoolsize.core") int threadPoolSizeCore,
                        @Named("eventlog.threadpoolsize.max") int threadPoolSizeMax); @Override void register(EventLogListener listener); @Override void register(EventLogListener listener, List<Class<? extends EventLogEvent>> events); @Override @SuppressWarnings("unchecked") void register(EventLogListener listener, String... events); @Override void postEvent(EventLogEvent event); @Override void run();  }