@Test public void getInitialListOfServers() throws ServiceCombException { List<ServiceInstance> instanceList = new ArrayList<>(); ServiceInstance serviceInstance = new ServiceInstance() { @Override public String getServiceId() { return "serviceid11"; } @Override public String getHost() { return null; } @Override public int getPort() { return 0; } @Override public boolean isSecure() { return false; } @Override public URI getUri() { return null; } @Override public Map<String, String> getMetadata() { Map<String, String> map = new HashMap<>(); map.put("status", MicroserviceInstanceStatus.UP.name()); return map; } }; instanceList.add(serviceInstance); new Expectations() { { iClientConfig.getClientName(); result = "serviceid11"; serviceCombClient.getInstances((Microservice) any, null); result = instanceList; } }; serviceCombServerList.initWithNiwsConfig(iClientConfig); List<Server> serverList = serviceCombServerList.getUpdatedListOfServers(); Assert.assertEquals(serverList.size(), 1); }
@Override public List<Server> getInitialListOfServers() { return Collections.emptyList(); }
ServiceCombServerList extends AbstractServerList<Server> { @Override public List<Server> getInitialListOfServers() { return Collections.emptyList(); } }
ServiceCombServerList extends AbstractServerList<Server> { @Override public List<Server> getInitialListOfServers() { return Collections.emptyList(); } ServiceCombServerList(
      ServiceCombDiscoveryProperties serviceCombDiscoveryProperties,
      ServiceCombClient serviceCombClient); }
ServiceCombServerList extends AbstractServerList<Server> { @Override public List<Server> getInitialListOfServers() { return Collections.emptyList(); } ServiceCombServerList(
      ServiceCombDiscoveryProperties serviceCombDiscoveryProperties,
      ServiceCombClient serviceCombClient); @Override void initWithNiwsConfig(IClientConfig iClientConfig); @Override List<Server> getInitialListOfServers(); @Override List<Server> getUpdatedListOfServers(); }
ServiceCombServerList extends AbstractServerList<Server> { @Override public List<Server> getInitialListOfServers() { return Collections.emptyList(); } ServiceCombServerList(
      ServiceCombDiscoveryProperties serviceCombDiscoveryProperties,
      ServiceCombClient serviceCombClient); @Override void initWithNiwsConfig(IClientConfig iClientConfig); @Override List<Server> getInitialListOfServers(); @Override List<Server> getUpdatedListOfServers();  }