@Test public void varArgConstructor() { NodeAddress a = new NodeAddress("127.0.0.1",8000); NodeAddress b = new NodeAddress("127.0.0.1",8000); ConstNodeDiscovery discovery = new ConstNodeDiscovery(a, b); List<NodeAddress> nodes = discovery.getNodeAddresses(); Assert.assertEquals( nodes.get(0), a ); Assert.assertEquals( nodes.get(1), b ); }
@Override public List<NodeAddress> getNodeAddresses() { return nodes; }
ConstNodeDiscovery implements NodeDiscovery { @Override public List<NodeAddress> getNodeAddresses() { return nodes; } }
ConstNodeDiscovery implements NodeDiscovery { @Override public List<NodeAddress> getNodeAddresses() { return nodes; } ConstNodeDiscovery(Collection<NodeAddress> nodes);  ConstNodeDiscovery(NodeAddress... nodes); }
ConstNodeDiscovery implements NodeDiscovery { @Override public List<NodeAddress> getNodeAddresses() { return nodes; } ConstNodeDiscovery(Collection<NodeAddress> nodes);  ConstNodeDiscovery(NodeAddress... nodes); @Override List<NodeAddress> getNodeAddresses(); }
ConstNodeDiscovery implements NodeDiscovery { @Override public List<NodeAddress> getNodeAddresses() { return nodes; } ConstNodeDiscovery(Collection<NodeAddress> nodes);  ConstNodeDiscovery(NodeAddress... nodes); @Override List<NodeAddress> getNodeAddresses();  }