}
@Test
public void testSocketTimeoutExistingConnection() throws Exception {
final HttpRoute route = new HttpRoute(target);
final HttpClientContext context = new HttpClientContext();
final RequestConfig config = RequestConfig.custom().setSocketTimeout(3000).build();
final HttpRequestWrapper request = HttpRequestWrapper.wrap(new HttpGet("http://bar/test"));
context.setRequestConfig(config);
final HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
Mockito.when(managedConn.isOpen()).thenReturn(true);
Mockito.when(requestExecutor.execute(
Mockito.same(request),
Mockito.<HttpClientConnection>any(),