@Override
    public List<RemoteInstance> queryRemoteNodes() {
        List<RemoteInstance> remoteInstances = new ArrayList<>();
        try {
            HealthClient healthClient = client.healthClient();
            // Discover only "passing" nodes
            List<ServiceHealth> nodes = healthClient.getHealthyServiceInstances(serviceName).getResponse();
            if (CollectionUtils.isNotEmpty(nodes)) {
                nodes.forEach(node -> {
                    if (!Strings.isNullOrEmpty(node.getService().getAddress())) {
                        Address address = new Address(node.getService().getAddress(), node.getService().getPort(), false);
                        if (address.equals(selfAddress)) {
                            address.setSelf(true);
                        }
                        remoteInstances.add(new RemoteInstance(address));
                    }
                });
            }
            ClusterHealthStatus healthStatus = OAPNodeChecker.isHealth(remoteInstances);
            if (healthStatus.isHealth()) {
                this.healthChecker.health();
            } else {
                this.healthChecker.unHealth(healthStatus.getReason());
            }
        } catch (Throwable e) {
            healthChecker.unHealth(e);
            throw new ServiceQueryException(e.getMessage());
        }
        if (log.isDebugEnabled()) {
            remoteInstances.forEach(instance -> log.debug("Cosule cluster instance: {}", instance));
        }
        return remoteInstances;
    }
@Test
    public void queryRemoteNodes() {
        registerSelfRemote();
        List<ServiceHealth> serviceHealths = mockHealth();
        when(consulResponse.getResponse()).thenReturn(serviceHealths);
        List<RemoteInstance> remoteInstances = coordinator.queryRemoteNodes();
        assertEquals(2, remoteInstances.size());

        RemoteInstance selfInstance = remoteInstances.get(0);
        velidate(selfRemoteAddress, selfInstance);

        RemoteInstance notSelfInstance = remoteInstances.get(1);
        velidate(remoteAddress, notSelfInstance);
    }