@Test
public void testOnFailedSendsEvents() throws InterruptedException {

	List<ExecutionMessage> messages = new ArrayList<>();
	Execution execution1 = createBranchExecution();
	Execution execution2 = new Execution();
	messages.add(createExecutionMessage(execution1));
	messages.add(createExecutionMessage(execution2));
	ScoreEvent event1 = new ScoreEvent("type1", "event1");
	ScoreEvent event2 = new ScoreEvent("type1", "event2");
	when(scoreEventFactory.createFailedBranchEvent(execution1)).thenReturn(event1);
	when(scoreEventFactory.createFailureEvent(execution2)).thenReturn(event2);
	queueListener.onFailed(messages);
	verify(eventBus, times(1)).dispatch(event1, event2);
}