final HttpClient secondHttpClient = HttpClientFactory.createHttpClient(secondProperties) ;
try
{
final HostConfiguration firstConfiguration = firstHttpClient.getHostConfiguration() ;
final HttpConnectionManagerParams firstParams = firstHttpClient.getHttpConnectionManager().getParams() ;
final HttpConnectionManager firstConnectionManager = firstHttpClient.getHttpConnectionManager() ;
assertEquals("MAX_TOTAL_CONNECTIONS not set", firstMaxTotalConnections, firstParams.getMaxTotalConnections()) ;
assertEquals("MAX_CONNECTIONS_PER_HOST not set", firstMaxConnectionsPerHost, firstParams.getMaxConnectionsPerHost(firstConfiguration)) ;
assertNotNull("connection manager is null", firstConnectionManager) ;
assertEquals("connection manager is not correct type", ESBMultiThreadedHttpConnectionManager.class, firstConnectionManager.getClass()) ;
assertNotNull("HostConfiguration is null", ((ESBMultiThreadedHttpConnectionManager)firstConnectionManager).getHostConfiguration()) ;
final HostConfiguration secondConfiguration = secondHttpClient.getHostConfiguration() ;
final HttpConnectionManagerParams secondParams = secondHttpClient.getHttpConnectionManager().getParams() ;
final HttpConnectionManager secondConnectionManager = secondHttpClient.getHttpConnectionManager() ;
assertEquals("MAX_TOTAL_CONNECTIONS not set", secondMaxTotalConnections, secondParams.getMaxTotalConnections()) ;
assertEquals("MAX_CONNECTIONS_PER_HOST not set", secondMaxConnectionsPerHost, secondParams.getMaxConnectionsPerHost(secondConfiguration)) ;
assertNotNull("connection manager is null", secondConnectionManager) ;
assertEquals("connection manager is not correct type", ESBMultiThreadedHttpConnectionManager.class, secondConnectionManager.getClass()) ;
assertNotNull("HostConfiguration is null", ((ESBMultiThreadedHttpConnectionManager)secondConnectionManager).getHostConfiguration()) ;
}
finally
{
HttpClientFactory.shutdown(secondHttpClient) ;