EventManagerImpl extends LifecycleSupport implements EventManager { @Override public void register(final Object listener) { checkNotNull(listener); log.trace("Adding listener: {}", listener); eventBus.register(listener); } @Inject  EventManagerImpl(final BeanContainer container); @VisibleForTesting void setDiscoveryEnabled(final boolean discoveryEnabled); @Override void register(final Object listener); @Override void unregister(final Object listener); @Override void publish(final Object event);  }
@Test public void testAddListener() throws Exception { try { underTest.register(null); fail(); } catch (NullPointerException e) { } underTest.register(listener); }