@Test
public void shouldFailWhenUnknownAndDepletedResources() {

  setResourceLimit("r1", 0);
  initWorkflow(workflowUsingResources(WORKFLOW_ID1, "r1", "r2", "r3"));
  populateActiveStates(RunState.create(INSTANCE_1, State.QUEUED, time.get()));
  scheduler.tick();
  verify(stateManager).receiveIgnoreClosed(
      eq(Event.runError(INSTANCE_1,
          "Referenced resources not found: [r2, r3]")),
      anyLong());
}