ConnManagerParams.setMaxTotalConnections(params, 30);
ConnPerRouteBean connPerRoute = new ConnPerRouteBean(6);
ConnManagerParams.setMaxConnectionsPerRoute(params, connPerRoute);
SchemeRegistry schemeRegistry = new SchemeRegistry();
hostNameResolver = new BrowserMobHostNameResolver(new Cache(DClass.ANY));
this.socketFactory = new SimulatedSocketFactory(hostNameResolver);
schemeRegistry.register(new Scheme("http", socketFactory, 80));
this.sslSocketFactory = new TrustingSSLSocketFactory(hostNameResolver);
TrustingSSLSocketFactory sslSocketFactory = this.sslSocketFactory;