FixedHostDiscovery implements HostDiscovery { @Override public Iterable<ServiceEndPoint> getHosts() { return _endPoints; } FixedHostDiscovery(ServiceEndPoint... endPoints);  FixedHostDiscovery(Iterable<ServiceEndPoint> endPoints); @Override Iterable<ServiceEndPoint> getHosts(); @Override void addListener(EndPointListener listener); @Override void removeListener(EndPointListener listener); @Override void close();  }
@Test public void testIgnoresChanges() throws Exception { List<ServiceEndPoint> endPoints = Lists.newArrayList(FOO); FixedHostDiscovery discovery = new FixedHostDiscovery(endPoints); endPoints.remove(FOO); assertEquals(1, Iterables.size(discovery.getHosts())); endPoints.add(BAR); assertEquals(1, Iterables.size(discovery.getHosts())); }