### Question:
NodeSet { private void removeNode(RayoNode node) { nodeKeys.remove(node.getHostname()); Iterator<Entry> it = entries.iterator(); while (it.hasNext()) { if (it.next().node.equals(node)) { it.remove(); break; } } }  RayoNode next(List<RayoNode> nodes);  }### Answer:
@Test public void testRemoveNode() { NodeSet nodeSet = new NodeSet(); List<RayoNode> nodes = createNodes("staging", new String[]{"localhost","connfu","voxeo"}, new String[]{"127.0.0.1","10.123.5.34", "208.9.3.23"}, new int[]{10,10,10}); for (int i=0;i<120;i++) { RayoNode next = nodeSet.next(nodes); RayoNode node = nodes.get(i%3); assertEquals(next,node); inc(node); } assertEquals(totals.get(nodes.get(0)),(Integer)40); assertEquals(totals.get(nodes.get(1)),(Integer)40); assertEquals(totals.get(nodes.get(2)),(Integer)40); List<RayoNode> newNodes = createNodes("staging", new String[]{"connfu","voxeo"}, new String[]{"10.123.5.34", "208.9.3.23"}, new int[]{10,10}); for (int i=0;i<120;i++) { RayoNode next = nodeSet.next(newNodes); RayoNode node = newNodes.get((i%2)); assertEquals(next,node); inc(node); } assertEquals(totals.get(nodes.get(0)),(Integer)40); assertEquals(totals.get(nodes.get(1)),(Integer)100); assertEquals(totals.get(nodes.get(2)),(Integer)100); }