AbstractEventBus implements EventBus { @Override public void fireAsync(Object event) { forEachListener(event, l -> executorService.submit( () -> l.onEvent(event) )); }  @Override void addListener(Class<T> eventClass, EventListener<T> listener); @Override void fire(Object event); @Override void fireAsync(Object event);  }
@Test public void testFireAsync() throws Exception { final AtomicBoolean fired = new AtomicBoolean(false); final CountDownLatch countDownLatch = new CountDownLatch(1); EventListener<Object> listener = evt -> { fired.set(true); countDownLatch.countDown(); }; EventBus eventBus = createEventBus(); eventBus.addListener(Object.class, listener); assertThat(fired.get(), is(false)); eventBus.fireAsync(new Object()); countDownLatch.await(); assertThat(fired.get(), is(true)); }