@Test
public void shouldCompleteOnZeroExitCode() {

  StateData data = data(1, 1.0, Optional.of(0));
  RunState zeroTerm = RunState.create(WORKFLOW_INSTANCE, TERMINATED, data, NOW, COUNTER);
  terminationHandler.transitionInto(zeroTerm, eventRouter);
  verify(eventRouter).receiveIgnoreClosed(Event.success(WORKFLOW_INSTANCE), COUNTER);
}