@Test
public void nodeNotFound() {

    AgentInstance agentInstance = createAgentInstance(INSTANCE_ID, INSTANCE_GROUP_ID);
    when(agentManagementService.findAgentInstance(INSTANCE_ID)).thenReturn(Optional.of(agentInstance));
    when(indexer.getByKey(INSTANCE_ID)).thenReturn(null);
    ConstraintEvaluator.Result result = kubeConstraint.evaluate(
            createTaskRequest(TASK_ID),
            createVirtualMachineCurrentStateMock(INSTANCE_ID, Collections.emptyList(), Collections.emptyList()),
            taskTrackerState);
    assertThat(result.isSuccessful()).isFalse();
    assertThat(result.getFailureReason()).isEqualToIgnoringCase(KubeConstraint.NODE_NOT_FOUND_REASON);
}