@Test
void agentInstanceIsNotStopped() {

    long now = clock.wallTime();
    clock.advanceTime(Duration.ofMillis(NODE_GC_GRACE_PERIOD + 1));
    V1NodeCondition readyCondition = new V1NodeCondition().type(READY).lastHeartbeatTime(new DateTime(now));
    V1Node node = new V1Node()
            .metadata(new V1ObjectMeta().name(NODE_NAME).annotations(Collections.singletonMap(NODE_LABEL_ACCOUNT_ID, CORRECT_ACCOUNT)))
            .spec(new V1NodeSpec())
            .status(new V1NodeStatus().addConditionsItem(readyCondition));
    AgentInstance agentInstance = AgentInstance.newBuilder()
            .withId(NODE_NAME)
            .withDeploymentStatus(InstanceLifecycleStatus.newBuilder().withState(InstanceLifecycleState.Started).build())
            .build();
    when(agentManagementService.findAgentInstance(NODE_NAME)).thenReturn(Optional.of(agentInstance));
    Assertions.assertThat(nodeGcController.isNodeEligibleForGc(node)).isFalse();
}