@Test
public void testConsistentHashNUniqTooFew() {

  int replicas = 100;
  ConsistentHash<String> hash = new ConsistentHash<String>(replicas, Arrays
      .asList("single machine"));
  StringBuilder sb = new StringBuilder();
  List<String> orig = new ArrayList<String>(20);
  LOG.info("Before: ");
  for (int i = 0; i < 20; i++) {
    String s = "this is a the key " + i;
    List<String> l = hash.getNUniqueBinsFor(s, 3);
    String bin = l.toString();
    sb.append(bin + ", ");
    orig.add(l.get(0).toString());
    // test uniqueness
    Set<String> set = new HashSet<String>(l);
    assertEquals(1, set.size());
  }
  LOG.info(sb.toString());
}