@Test
public void shouldStopOnRetryConditionNotMet() {

  var data = data(1, 1.0, Optional.of(2));
  var nonZeroTerm = RunState.create(WORKFLOW_INSTANCE, TERMINATED, data, NOW, COUNTER);
  when(workflows.get()).thenReturn(Map.of(WORKFLOW_WITH_RETRY_CONDITION.id(), WORKFLOW_WITH_RETRY_CONDITION));
  terminationHandler.transitionInto(nonZeroTerm, eventRouter);
  verify(eventRouter).receiveIgnoreClosed(Event.stop(WORKFLOW_INSTANCE), COUNTER);
}