### Question:
ExtendedJestClientFactory extends JestClientFactory { Registry<SchemeIOSessionStrategy> createSchemeIOSessionStrategyRegistry() { HttpClientConfig httpClientConfig = wrappedHttpClientConfig.getHttpClientConfig(); return RegistryBuilder.<SchemeIOSessionStrategy>create() .register("http", httpClientConfig.getHttpIOSessionStrategy()) .register("https", httpClientConfig.getHttpsIOSessionStrategy()) .build(); } ExtendedJestClientFactory(WrappedHttpClientConfig wrappedHttpClientConfig);   }### Answer:
@Test public void registryBuilderUsesProvidedHttpIOSessionStrategy() { HttpClientConfig.Builder httpClientConfigBuilder = createTestHttpClientConfigBuilder(); SchemeIOSessionStrategy expectedSchemeIOSessionStrategy = mock(SchemeIOSessionStrategy.class); httpClientConfigBuilder.httpIOSessionStrategy(expectedSchemeIOSessionStrategy); WrappedHttpClientConfig.Builder builder = createDefaultTestWrappedHttpClientConfigBuilder(httpClientConfigBuilder.build()); ExtendedJestClientFactory factory = new ExtendedJestClientFactory(builder.build()); Registry<SchemeIOSessionStrategy> registry = factory.createSchemeIOSessionStrategyRegistry(); assertEquals(expectedSchemeIOSessionStrategy, registry.lookup("http")); }
@Test public void registryBuilderUsesProvidedHttpsIOSessionStrategy() { SchemeIOSessionStrategy expectedSchemeIOSessionStrategy = mock(SchemeIOSessionStrategy.class); HttpClientConfig.Builder httpClientConfigBuilder = createTestHttpClientConfigBuilder(expectedSchemeIOSessionStrategy); WrappedHttpClientConfig.Builder builder = createDefaultTestWrappedHttpClientConfigBuilder(httpClientConfigBuilder.build()); ExtendedJestClientFactory factory = new ExtendedJestClientFactory(builder.build()); Registry<SchemeIOSessionStrategy> registry = factory.createSchemeIOSessionStrategyRegistry(); assertEquals(expectedSchemeIOSessionStrategy, registry.lookup("https")); }