@Override
      public Void answer(InvocationOnMock invocation) throws Throwable {
        Long hostId = (Long) invocation.getArguments()[0];
        if (!commands.containsKey(hostId)) {
          commands.put(hostId, new ArrayList<>());
        }
        commands.get(hostId).add((AgentCommand) invocation.getArguments()[1]);
        return null;
      }
Checks what happens when stage has an execution command for
host component that has been recently deleted
@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java