@Test
public void shouldSendBackToQueueOnDisabledGlobally() {

  when(config.globalEnabled()).thenReturn(false);
  initWorkflow(workflowUsingResources(WORKFLOW_ID1));
  var stateData = StateData.newBuilder().tries(0).build();
  populateActiveStates(RunState.create(INSTANCE_1, State.QUEUED, stateData, time.get()));
  scheduler.tick();
  var event = eventCaptor.getValue();
  assertThat(event.workflowInstance(), is(INSTANCE_1));
  assertThat(EventUtil.name(event).equals("retryAfter"), is(true));
}