*/
@Test
public void testApacheHttpClient4ExecutorSharedHttpClientFinalize() throws Throwable
{
HttpClient httpClient = new DefaultHttpClient();
ApacheHttpClient4Engine engine = new ApacheHttpClient4Engine(httpClient);
ResteasyClient client = new ResteasyClientBuilder().httpEngine(engine).build();
Response response = client.target(generateURL("/test")).request().post(null);
Assert.assertEquals(204, response.getStatus());
engine.finalize();
Assert.assertEquals(httpClient, engine.getHttpClient());
HttpPost post = new HttpPost(generateURL("/test"));
HttpResponse httpResponse = httpClient.execute(post);
Assert.assertEquals(204, httpResponse.getStatusLine().getStatusCode());
httpClient.getConnectionManager().shutdown();
}