@Test
public void testEstablishRouteViaProxyTunnel() throws Exception {
final AuthState authState = new AuthState();
final HttpRoute route = new HttpRoute(target, null, proxy, true);
final HttpClientContext context = new HttpClientContext();
final RequestConfig config = RequestConfig.custom()
.setConnectTimeout(321)
.build();
context.setRequestConfig(config);
final HttpRequestWrapper request = HttpRequestWrapper.wrap(new HttpGet("http://bar/test"));
final HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
Mockito.when(managedConn.isOpen()).thenReturn(Boolean.TRUE);
Mockito.when(requestExecutor.execute(