FutureCallback<None> callback = new FutureCallback<None>();
factory.shutdown(callback, 60, TimeUnit.MINUTES);
callback.get(60, TimeUnit.SECONDS);
scheduler.shutdown();
channelFactory.releaseExternalResources();
Assert.assertTrue(scheduler.awaitTermination(60, TimeUnit.SECONDS));
Assert.assertTrue(boss.awaitTermination(60, TimeUnit.SECONDS));
Assert.assertTrue(worker.awaitTermination(60, TimeUnit.SECONDS));
}