@Test
public void testEventsThrownForOnTerminated() throws InterruptedException {

	List<ExecutionMessage> messages = new ArrayList<>();
	messages.add(createExecutionMessage());
	messages.add(createExecutionMessage());
	ScoreEvent event1 = new ScoreEvent("type1", "event1");
	ScoreEvent event2 = new ScoreEvent("type1", "event2");
	when(scoreEventFactory.createFinishedEvent(any(Execution.class))).thenReturn(event1, event2);
	queueListener.onTerminated(messages);
	verify(eventBus, times(1)).dispatch(event1, event2);
}