@Test
@SuppressWarnings("rawtypes")
public void testNotifyEvent() throws InterruptedException {

    EventListener listener = mock(EventListener.class);
    victim.notifyListener(listener, new TaskExecutionCompletedEvent(1L, NotifiableTaskMetadata.NULL));
    // FIXME
    // ugly but needed to give time for the async notification
    Thread.sleep(1000);
    verify(listener, times(1)).onEvent(any(AbstractNotificationEvent.class));
}