@Test public void testOnTerminatedBranchExecution() { List<ExecutionMessage> messages = new ArrayList<>(); Execution execution1 = createBranchExecution(); Execution execution2 = createBranchExecution(); messages.add(createExecutionMessage(execution1)); messages.add(createExecutionMessage(execution2)); queueListener.onTerminated(messages); verify(splitJoinService, times(1)).endBranch((List<Execution>) argThat(hasItem(execution1))); verify(splitJoinService, times(1)).endBranch((List<Execution>) argThat(hasItem(execution2))); }
@Override public void onTerminated(List<ExecutionMessage> messages) { ScoreEvent[] scoreEvents = handleTerminatedMessages(messages); if (scoreEvents.length > 0) { try { eventBus.dispatch(scoreEvents); } catch (InterruptedException e) { logger.error("Thread is interrupted. Ignoring... ", e); } } }
QueueListenerImpl implements QueueListener { @Override public void onTerminated(List<ExecutionMessage> messages) { ScoreEvent[] scoreEvents = handleTerminatedMessages(messages); if (scoreEvents.length > 0) { try { eventBus.dispatch(scoreEvents); } catch (InterruptedException e) { logger.error("Thread is interrupted. Ignoring... ", e); } } } }
QueueListenerImpl implements QueueListener { @Override public void onTerminated(List<ExecutionMessage> messages) { ScoreEvent[] scoreEvents = handleTerminatedMessages(messages); if (scoreEvents.length > 0) { try { eventBus.dispatch(scoreEvents); } catch (InterruptedException e) { logger.error("Thread is interrupted. Ignoring... ", e); } } }  }
QueueListenerImpl implements QueueListener { @Override public void onTerminated(List<ExecutionMessage> messages) { ScoreEvent[] scoreEvents = handleTerminatedMessages(messages); if (scoreEvents.length > 0) { try { eventBus.dispatch(scoreEvents); } catch (InterruptedException e) { logger.error("Thread is interrupted. Ignoring... ", e); } } }  @Override void prePersist(List<ExecutionMessage> messages); @Override void onEnqueue(List<ExecutionMessage> messages, int queueSize); @Override void onPoll(List<ExecutionMessage> messages, int queueSize); @Override void onTerminated(List<ExecutionMessage> messages); @Override void onFailed(List<ExecutionMessage> messages); @Override void onPersistMessage(List<ExecutionMessage> messages); }
QueueListenerImpl implements QueueListener { @Override public void onTerminated(List<ExecutionMessage> messages) { ScoreEvent[] scoreEvents = handleTerminatedMessages(messages); if (scoreEvents.length > 0) { try { eventBus.dispatch(scoreEvents); } catch (InterruptedException e) { logger.error("Thread is interrupted. Ignoring... ", e); } } }  @Override void prePersist(List<ExecutionMessage> messages); @Override void onEnqueue(List<ExecutionMessage> messages, int queueSize); @Override void onPoll(List<ExecutionMessage> messages, int queueSize); @Override void onTerminated(List<ExecutionMessage> messages); @Override void onFailed(List<ExecutionMessage> messages); @Override void onPersistMessage(List<ExecutionMessage> messages);  }