### Question:
ConsistentHash { public T getNodeFor(Object key) { if (circle.isEmpty()) { return null; } int hash = hashFunction.hash(key); T node = circle.get(hash); if (node == null) { SortedMap<Integer, T> tailMap = circle.tailMap(hash); hash = tailMap.isEmpty() ? circle.firstKey() : tailMap.firstKey(); node = circle.get(hash); } return node; } ConsistentHash(int numberOfReplicas, Collection<T> nodes);  ConsistentHash(HashFunction hashFunction, int numberOfReplicas, Collection<T> nodes); T getNodeFor(Object key); List<T> getNUniqueNodesFor(Object key, int n); List<T> getNUniqueNodesFor(Object key, int n, List<String> disasterList);  }### Answer:
@Test public void getNodeFor() { String key = "test"; TestNode testNode = consistentHash.getNodeFor(key); LOGGER.info("getNodeFor key: {}, result: {}", key, testNode); assertNotNull(testNode); assertTrue(testNodes.contains(testNode)); }