}
};
final AsyncFuture<Integer> future = client.execute(request);
final AsyncFuture.Status completed = future.await(1, TimeUnit.SECONDS);
Assert.assertEquals(completed, AsyncFuture.Status.WAITING);
client.shutdown();
boolean done = client.awaitCompletion(1, TimeUnit.SECONDS);
Assert.assertFalse(done);
latch.countDown();
done = client.awaitCompletion(2, TimeUnit.SECONDS);
Assert.assertTrue(done);