@Test
  public void testGetObject() throws Exception {
    final MemcachedClientFactoryBean factory = new MemcachedClientFactoryBean();
    factory.setDaemon(true);
    factory.setFailureMode(FailureMode.Cancel);
    factory.setHashAlg(DefaultHashAlgorithm.CRC_HASH);
    factory.setProtocol(Protocol.BINARY);
    factory.setServers(TestConfig.IPV4_ADDR + ":22211 " + TestConfig.IPV4_ADDR
        + ":22212");
    factory.setShouldOptimize(true);
    final Transcoder<Object> transcoder = new SerializingTranscoder();
    factory.setTranscoder(transcoder);

    factory.afterPropertiesSet();

    final MemcachedClient memcachedClient =
        (MemcachedClient) factory.getObject();

    Assert.assertEquals("servers", 2,
        memcachedClient.getUnavailableServers().size());
    Assert.assertSame("transcoder", transcoder,
        memcachedClient.getTranscoder());
  }
Test cases for the {@link MemcachedClientFactoryBean} implementation.

@author Eran Harel
src/test/java/net/spy/memcached/spring/MemcachedClientFactoryBeanTest.java