HttpConnectionManagerParams.setMaxTotalConnections(params, 3);
ThreadSafeClientConnManager mgr = createTSCCM(params, null);
HttpHost target1 = new HttpHost("www.test1.invalid", 80, "http");
HttpRoute route1 = new HttpRoute(target1, null, false);
HttpHost target2 = new HttpHost("www.test2.invalid", 80, "http");
HttpRoute route2 = new HttpRoute(target2, null, false);
HttpHost target3 = new HttpHost("www.test3.invalid", 80, "http");
HttpRoute route3 = new HttpRoute(target3, null, false);
// the first three allocations should pass
ManagedClientConnection conn1 = mgr.getConnection(route1, 10L);
ManagedClientConnection conn2 = mgr.getConnection(route2, 10L);
ManagedClientConnection conn3 = mgr.getConnection(route3, 10L);