HttpClient httpClient = new HttpClient();
httpClient.setProxyHost("localhost");
httpClient.setProxyPort(proxy.getLocalPort());
IHttpResponse response = httpClient.call(new GetRequest("http://localhost:" + server.getLocalPort() + "/"));
Assert.assertEquals(200, response.getStatus());
Assert.assertEquals("OK", response.getBody().readString());
QAUtil.sleep(500);
response = httpClient.call(new GetRequest("http://localhost:" + server.getLocalPort() + "/"));
Assert.assertEquals(200, response.getStatus());
Assert.assertEquals("OK", response.getBody().readString());
QAUtil.sleep(500);
Assert.assertEquals(1, server.getNumHandledConnections()); // connection should have been reused
httpClient.close();