Assert.assertNotNull(connection);
pool.release(connection);
connection = pool.acquire(host);
Assert.assertNotNull(connection);
ExecutorService service = Executors.newSingleThreadExecutor();
service.invokeAny(Collections.singleton(new Callable<Connection>() {
@Override
public Connection call() throws Exception {
return pool.acquire(host);
}
}), 2, TimeUnit.SECONDS);