@Test
public void shouldTestEventEngine() throws Exception {
final AtomicBoolean invoked = new AtomicBoolean(false);
DefaultEventDelegate engine = new DefaultEventDelegate();
engine.addListener(aType, new Listener<CustomEvent>() {
@Override
public void handleEvent(CustomEvent eventArgs) {
invoked.set(true);
}
@Override
public EventExecutionMode getMode() {
return EventExecutionMode.NORMAL;
}
@Override
public boolean isEager() {
return false;
}
});
engine.fireEvent(aType, new CustomEvent());
assertTrue(invoked.get());
}