@Test
public void shouldExecuteRetryIfDelayIsReset() {

  initWorkflow(workflowUsingResources(WORKFLOW_ID1));
  StateData stateData = StateData.newBuilder().retryDelayMillis(15_000L).tries(10).build();
  populateActiveStates(RunState.create(INSTANCE_1, State.QUEUED, stateData, time.get()));
  now = now.plus(10, ChronoUnit.SECONDS);
  scheduler.tick();
  verify(stateManager, never()).receiveIgnoreClosed(any());
  stateData = StateData.newBuilder().retryDelayMillis(0L).tries(10).build();
  populateActiveStates(RunState.create(INSTANCE_1, State.QUEUED, stateData, time.get()));
  scheduler.tick();
  verify(stateManager).receiveIgnoreClosed(eq(Event.dequeue(INSTANCE_1, ImmutableSet.of())), anyLong());
}