private void runThisManyNodes(final int totalNodes) {
    final String[] stringNodes = generateAddresses(totalNodes);

    List<MemcachedNode> smaller =
        createNodes(AddrUtil.getAddresses(stringNodes[0]));
    List<MemcachedNode> larger =
        createNodes(AddrUtil.getAddresses(stringNodes[1]));

    assertTrue(larger.containsAll(smaller));
    MemcachedNode oddManOut = larger.get(larger.size() - 1);
    assertFalse(smaller.contains(oddManOut));

    KetamaNodeLocator lgLocator =
        new KetamaNodeLocator(larger, DefaultHashAlgorithm.KETAMA_HASH);
    KetamaNodeLocator smLocator =
        new KetamaNodeLocator(smaller, DefaultHashAlgorithm.KETAMA_HASH);

    SortedMap<Long, MemcachedNode> lgMap = lgLocator.getKetamaNodes();
    SortedMap<Long, MemcachedNode> smMap = smLocator.getKetamaNodes();

    // Verify that EVERY entry in the smaller map has an equivalent
    // mapping in the larger map.
    boolean failed = false;
    for (final Long key : smMap.keySet()) {
      final MemcachedNode largeNode = lgMap.get(key);
      final MemcachedNode smallNode = smMap.get(key);
      if (!largeNode.equals(smallNode)) {
        failed = true;
        System.out.println("---------------");
        System.out.println("Key: " + key);
        System.out.println("Small: " + smallNode.getSocketAddress());
        System.out.println("Large: " + largeNode.getSocketAddress());
      }
    }
    assertFalse(failed);

    for (final Map.Entry<Long, MemcachedNode> entry : lgMap.entrySet()) {
      final Long key = entry.getKey();
      final MemcachedNode node = entry.getValue();
      if (node.equals(oddManOut)) {
        final MemcachedNode newNode = smLocator.getNodeForKey(key);
        if (!smaller.contains(newNode)) {
          System.out.println("Error - " + key + " -> "
              + newNode.getSocketAddress());
          failed = true;
        }
      }
    }
    assertFalse(failed);
  }
Simulate dropping from (totalNodes) to (totalNodes-1). Ensure hashing is
consistent between the the two scenarios.

@param totalNodes
src/test/java/net/spy/memcached/ConsistentHashingTest.java