ReactiveDatasource { public void addEventListener(EventListener<T> listener) { logger.info("Adding listener to ReactiveDatasource."); notNull(listener, "Can not add null eventListener"); eventChannel.addEventListener(listener); } ReactiveDatasource(EventSource eventSource); @VisibleForTesting  ReactiveDatasource(EventSource eventSource, EventChannel<T> eventChannel); @VisibleForTesting  ReactiveDatasource(EventChannel<T> eventChannel, EventPoller<T> eventPoller); void addEventListener(EventListener<T> listener); boolean isStarted(); void start(); void stop();  }
@Test(groups = SMALL, expectedExceptions = IllegalArgumentException.class) public void testCanNotAddANullEventListener() { reactiveDatasource.addEventListener(null); }
@Test(groups = SMALL) public void testAddingEventListenerAddsTheListenerToTheChannel() { reactiveDatasource.addEventListener(listener); verify(channel).addEventListener(listener); }