ZookeeperCoordinator implements ClusterRegister, ClusterNodesQuery { @Override public List<RemoteInstance> queryRemoteNodes() { List<RemoteInstance> remoteInstanceDetails = new ArrayList<>(20); List<ServiceInstance<RemoteInstance>> serviceInstances = serviceCache.getInstances(); serviceInstances.forEach(serviceInstance -> { RemoteInstance instance = serviceInstance.getPayload(); if (instance.getAddress().equals(selfAddress)) { instance.getAddress().setSelf(true); } else { instance.getAddress().setSelf(false); } remoteInstanceDetails.add(instance); }); return remoteInstanceDetails; } ZookeeperCoordinator(ClusterModuleZookeeperConfig config,
                         ServiceDiscovery<RemoteInstance> serviceDiscovery); @Override synchronized void registerRemote(RemoteInstance remoteInstance); @Override List<RemoteInstance> queryRemoteNodes();  }
@Test public void queryRemoteNodes() { }