@Test
public void testInstanceNotUpInEurekaIsUnhealthy() {

    for (InstanceStatus status : asList(InstanceStatus.DOWN, InstanceStatus.STARTING, InstanceStatus.OUT_OF_SERVICE, InstanceStatus.UNKNOWN)) {
        mockStatusInEureka(instance, status);
        AgentStatus agentStatus = monitor.getStatus(instance.getId());
        assertThat(agentStatus.getStatusCode()).isEqualTo(AgentStatusCode.Unhealthy);
    }
}