@Test
public void agentHasConcurrentLaunchLimitFromPreviousEvaluation() {

    Task startedTask = createStartLaunchedTask(TASK_ID);
    when(jobOperations.getTasks()).thenReturn(Collections.singletonList(startedTask));
    TaskRequest taskRequest = createTaskRequest(TASK_ID);
    VirtualMachineCurrentState currentState = createVirtualMachineCurrentStateMock(INSTANCE_ID,
            Collections.singletonList(taskRequest), Collections.emptyList());
    AssignableVirtualMachine machine = createAssignableVirtualMachineMock(currentState);
    List<AssignableVirtualMachine> filteredMachines = machinesFilter.filter(Collections.singletonList(machine));
    assertThat(filteredMachines).isEmpty();
}