ApacheConnectionManagerFactory implements
        ConnectionManagerFactory<HttpClientConnectionManager> { @Override public HttpClientConnectionManager create(final HttpClientSettings settings) { ConnectionSocketFactory sslsf = getPreferredSocketFactory(settings); final PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager( createSocketFactoryRegistry(sslsf), null, DefaultSchemePortResolver.INSTANCE, new DelegatingDnsResolver(settings.getDnsResolver()), settings.getConnectionPoolTTL(), TimeUnit.MILLISECONDS); cm.setValidateAfterInactivity(settings.getValidateAfterInactivityMillis()); cm.setDefaultMaxPerRoute(settings.getMaxConnections()); cm.setMaxTotal(settings.getMaxConnections()); cm.setDefaultSocketConfig(buildSocketConfig(settings)); cm.setDefaultConnectionConfig(buildConnectionConfig(settings)); return cm; }  @Override HttpClientConnectionManager create(final HttpClientSettings settings);  }
@Test public void validateAfterInactivityMillis_RespectedInConnectionManager() { final int validateAfterInactivity = 1234; final HttpClientSettings httpClientSettings = HttpClientSettings.adapt(new ClientConfiguration() .withValidateAfterInactivityMillis(validateAfterInactivity)); final PoolingHttpClientConnectionManager connectionManager = (PoolingHttpClientConnectionManager) factory.create(httpClientSettings); assertEquals(validateAfterInactivity, connectionManager.getValidateAfterInactivity()); }