### Question:
SpyMemcachedAdapter implements MemcachedAdapter { protected ConnectionFactoryBuilder createConnectionFactoryBuilder(OverridableReadOnlyProperties properties) { ConnectionFactoryBuilder builder = new ConnectionFactoryBuilder(); builder.setProtocol(ConnectionFactoryBuilder.Protocol.BINARY); builder.setLocatorType(ConnectionFactoryBuilder.Locator.CONSISTENT); builder.setUseNagleAlgorithm(false); builder.setFailureMode(FailureMode.Redistribute); String hashAlgorithmProeprty = properties.getRequiredProperty(HASH_ALGORITHM_PROPERTY_KEY); builder.setHashAlg(DefaultHashAlgorithm.valueOf(hashAlgorithmProeprty)); String operationTimeoutProperty = properties.getRequiredProperty(OPERATION_TIMEOUT_MILLIS_PROPERTY_KEY); builder.setOpTimeout(Long.parseLong(operationTimeoutProperty)); String transcoderClassProperty = properties.getRequiredProperty(TRANSCODER_PROPERTY_KEY); builder.setTranscoder(createTranscoder(properties, transcoderClassProperty)); authenticate(builder, properties); return builder; }  void setMemcachedClient(MemcachedClientIF memcachedClient); void setCacheKeyPrefix(String cacheKeyPrefix); @Override void init(OverridableReadOnlyProperties properties); @Override void destroy(); @Override Object get(CacheNamespace cacheNamespace, String key); @Override void set(CacheNamespace cacheNamespace, String key, Object value, int expirySeconds); @Override void delete(CacheNamespace cacheNamespace, String key); @Override long increaseCounter(CacheNamespace cacheNamespace, String key, long by, long defaultValue, int expirySeconds); @Override long getCounter(CacheNamespace cacheNamespace, String key, long defaultValue, int expirySeconds); @Override void evictAll(CacheNamespace cacheNamespace); static final String PROPERTY_KEY_PREFIX; static final String HOST_PROPERTY_KEY; static final String HASH_ALGORITHM_PROPERTY_KEY; static final String OPERATION_TIMEOUT_MILLIS_PROPERTY_KEY; static final String TRANSCODER_PROPERTY_KEY; static final String CACHE_KEY_PREFIX_PROPERTY_KEY; static final String AUTH_GENERATOR_PROPERTY_KEY; static final String AUTH_WAIT_TIME_MILLIS_PROPERTY_KEY; static final String NAMESPACE_NAME_SQUENCE_SEPARATOR; static final int DEFAULT_NAMESPACE_SEQUENCE_EXPIRY_SECONDS; static final long DEFAULT_AUTH_WAIT_TIME_MILLIS; }### Answer:
@Test public void createConnectionFactoryBuilder() throws Exception { Properties props = new Properties(); props.setProperty(HASH_ALGORITHM_PROPERTY_KEY, DefaultHashAlgorithm.NATIVE_HASH.name()); props.setProperty(OPERATION_TIMEOUT_MILLIS_PROPERTY_KEY, String.valueOf(13579)); props.setProperty(TRANSCODER_PROPERTY_KEY, FakeTranscoder.class.getName()); props.setProperty(AUTH_GENERATOR_PROPERTY_KEY, FakeAuthDescriptorGenerator.class.getName()); ConnectionFactoryBuilder builder = spyMemcachedAdapter.createConnectionFactoryBuilder(new OverridableReadOnlyPropertiesImpl(props)); ConnectionFactory connectionFactory = builder.build(); assertThat(connectionFactory.getHashAlg()).isEqualTo(DefaultHashAlgorithm.NATIVE_HASH); assertThat(connectionFactory.getOperationTimeout()).isEqualTo(13579); Transcoder<Object> transcoder = connectionFactory.getDefaultTranscoder(); assertThat(transcoder).isExactlyInstanceOf(FakeTranscoder.class); FakeTranscoder fakeTranscoder = (FakeTranscoder) transcoder; assertThat(fakeTranscoder.isInitialized()).isTrue(); AuthDescriptor authDescriptor = connectionFactory.getAuthDescriptor(); assertThat(authDescriptor.getMechs()).isEqualTo(FakeAuthDescriptorGenerator.FAKE_MECHS); }