### Question:
BalancerConsistentHash implements KeyBasedBalancer<K, I> { @Override public Optional<I> get(K key) { if (hash == null){ return Optional.empty(); } else { return hash.getNode(key); } } BalancerConsistentHash(
            List<I> nodes,
            Balancer<I> balancer,
            Function<I, String> nodeName,
            ToLongFunction<K> keyMapper,
            int quorumSize
    ); @Override Optional<I> get(K key); @Override Stream<I> getQuorum(K key); @Override Optional<I> get(); @Override Stream<I> nodes(); @Override void reBalance();  }### Answer:
@Test(groups = "unit") public void get() throws Exception { BalancerConsistentHash<Long, String> hash1 = new BalancerConsistentHash<>( Arrays.asList("node1", "node2"), Balancer.empty(), node -> node, key -> ConsistentHash.halfMd5Hash(key.toString()), 1 ); assertEquals(hash1.get(42L).get(), "node1"); BalancerConsistentHash<Long, String> hash2 = new BalancerConsistentHash<>( Arrays.asList(), Balancer.empty(), node -> node, key -> ConsistentHash.halfMd5Hash(key.toString()), 1 ); assertFalse(hash2.get(42L).isPresent()); }