public void testSettingProperties() {
        Map<InetSocketAddress, Integer> weights = new HashMap<InetSocketAddress, Integer>();
        weights.put(new InetSocketAddress("localhost", 11211), 8);
        KetamaConnectionFactory connectionFactory = new KetamaConnectionFactory(
                1, 1, 1, DefaultHashAlgorithm.FNV1_32_HASH,
                KetamaNodeKeyFormatter.Format.LIBMEMCACHED, weights);
        assertEquals(connectionFactory.getWeights(), weights);
        assertEquals(connectionFactory.getHashAlg(), DefaultHashAlgorithm.FNV1_32_HASH);
        assertEquals(connectionFactory.getKetamaNodeKeyFormat(), KetamaNodeKeyFormatter.Format.LIBMEMCACHED);
  }
A very basic test that the KetamaConnectionFactory returns both the correct
hash algorithm and the correct node locator.
src/test/java/net/spy/memcached/KetamaConnectionFactoryTest.java