@Test
public void testWithThreadsConfiguration() throws Exception {

  HttpClientConnectionManager connectionManager = HttpClientConnectionManagerFactory.create(3, null);
  assertThat(connectionManager, is(instanceOf(PoolingHttpClientConnectionManager.class)));
  PoolingHttpClientConnectionManager poolingConnectionManager = (PoolingHttpClientConnectionManager) connectionManager;
  assertThat(poolingConnectionManager.getDefaultMaxPerRoute(), is(9));
  assertThat(poolingConnectionManager.getMaxTotal(), is(9));
  assertThat(poolingConnectionManager.getValidateAfterInactivity(), is(1000));
}