### Question:
ExtendedJestClientFactory extends JestClientFactory { IOReactorConfig createIoReactorConfig() { HttpClientConfig httpClientConfig = wrappedHttpClientConfig.getHttpClientConfig(); return IOReactorConfig.custom() .setConnectTimeout(httpClientConfig.getConnTimeout()) .setSoTimeout(httpClientConfig.getReadTimeout()) .setIoThreadCount(wrappedHttpClientConfig.getIoThreadCount()) .build(); } ExtendedJestClientFactory(WrappedHttpClientConfig wrappedHttpClientConfig);   }### Answer:
@Test public void ioReactorConfigUsesGivenIoThreadCount() { WrappedHttpClientConfig.Builder builder = createDefaultTestWrappedHttpClientConfigBuilder(); int expectedIoThreadCount = random.nextInt(16) + 1; builder.ioThreadCount(expectedIoThreadCount); ExtendedJestClientFactory factory = new ExtendedJestClientFactory(builder.build()); IOReactorConfig ioReactorConfig = factory.createIoReactorConfig(); assertEquals(expectedIoThreadCount, ioReactorConfig.getIoThreadCount()); }
@Test public void ioReactorConfigUsesGivenReadTimeout() { HttpClientConfig.Builder httpClientConfigBuilder = createTestHttpClientConfigBuilder(); int expectedReadTImeout = random.nextInt(1000) + 1; httpClientConfigBuilder.readTimeout(expectedReadTImeout); WrappedHttpClientConfig.Builder builder = createDefaultTestWrappedHttpClientConfigBuilder(httpClientConfigBuilder.build()); ExtendedJestClientFactory factory = new ExtendedJestClientFactory(builder.build()); IOReactorConfig ioReactorConfig = factory.createIoReactorConfig(); assertEquals(expectedReadTImeout, ioReactorConfig.getSoTimeout()); }
@Test public void ioReactorConfigUsesGivenConnectTimeout() { HttpClientConfig.Builder httpClientConfigBuilder = createTestHttpClientConfigBuilder(); int expectedConnectTImeout = random.nextInt(1000) + 1; httpClientConfigBuilder.connTimeout(expectedConnectTImeout); WrappedHttpClientConfig.Builder builder = createDefaultTestWrappedHttpClientConfigBuilder(httpClientConfigBuilder.build()); ExtendedJestClientFactory factory = new ExtendedJestClientFactory(builder.build()); IOReactorConfig ioReactorConfig = factory.createIoReactorConfig(); assertEquals(expectedConnectTImeout, ioReactorConfig.getConnectTimeout()); }