### Question:
RendezvousNodeRouter implements NodeRouter<N> { @Override public Optional<N> getNode(String nodeId) { return strategy.getNode(nodeId, ring, hashFunction); } private  RendezvousNodeRouter(
      Collection<N> initialNodes, HashFunction hashFunction, RendezvousStrategy<N> strategy); static NodeRouter<N> create(
      HashFunction hashFunction, RendezvousStrategy<N> strategy); static NodeRouter<N> create(
      Collection<N> initialNodes, HashFunction hashFunction, RendezvousStrategy<N> strategy); @Override Optional<N> getNode(String nodeId); @Override void addNode(N node); @Override void removeNode(String nodeId);  }### Answer:
@Test void testEmpty() { NodeRouter<WeightedNode> router = createRendezvousRouter(); assertFalse(router.getNode("key").isPresent()); }
@Test void testDifferentOrder() { NodeRouter<WeightedNode> router1 = createRendezvousRouter(); NodeRouter<WeightedNode> router2 = createRendezvousRouter(); IntStream.range(0, 1000) .parallel() .mapToObj(index -> WeightedNode.of("node" + index)) .forEach(router1::addNode); StreamUtil.reverseRange(0, 1000) .parallel() .mapToObj(index -> WeightedNode.of("node" + index)) .forEach(router2::addNode); assertEquals(router2.getNode("key"), router1.getNode("key")); }