SimpleEventBus extends EventBus { @Override protected <T> T throwSync(T event) { try { final Collection<ListenerMethod> methods = getMethods(getClassName(event.getClass())); return this.createRunnable(methods, event).call(); } catch (final Throwable throwable) { Logger.error("Failed to call event of type {}", event.getClass()); ServerImplementation.getImplementation().getErrorDigest().digest(throwable); } return event; } SimpleEventBus(); final Collection<ListenerMethod> getMethods(final String eventType);  }
@Test void throwSync() { try { final EventBus bus = createEventBus(); bus.registerListeners(new TestListenerClass()); final String event = "Hello World!"; Assertions.assertEquals(event, bus.throwSync(event)); Assertions.assertTrue(indicateSuccess); } finally { indicateSuccess = false; } }