* supplied through a constructor.
*/
@Test
public void testClientRequestSharedExecutor() throws Exception
{
ClientExecutor executor = new ApacheHttpClient4Executor();
ClientRequest request1 = new ClientRequest(generateURL("/test"), executor);
ClientResponse<?> response1 = request1.post();
Assert.assertEquals(204, response1.getStatus());
ClientRequest request2 = new ClientRequest(generateURL("/test"), executor);
ClientResponse<?> response2 = request2.post();
Assert.assertEquals(204, response2.getStatus());
ClientExecutor executor1 = request1.getExecutor();
ClientExecutor executor2 = request2.getExecutor();
Assert.assertSame(executor, executor1);
Assert.assertSame(executor, executor2);
executor.close();
}