@SafeVarargs
private final void assertPrivatePools(Injector injector, Class<? extends Annotation>... privateClientAnnotations)
throws Exception
{
JettyIoPoolManager sharedPool = injector.getInstance(Key.get(JettyIoPoolManager.class));
// pool should not be destroyed yet
assertFalse(sharedPool.isDestroyed());
Set<JettyIoPoolManager> privatePools = Collections.newSetFromMap(new IdentityHashMap<JettyIoPoolManager, Boolean>());
for (Class<? extends Annotation> privateClientAnnotation : privateClientAnnotations) {
assertNotNull(injector.getExistingBinding(Key.get(JettyIoPoolManager.class, privateClientAnnotation)));
JettyIoPoolManager privatePool = injector.getInstance(Key.get(JettyIoPoolManager.class, privateClientAnnotation));
// pool should not be the same as any other pool
assertNotSame(privatePool, sharedPool);
assertFalse(privatePools.contains(privatePool));
privatePools.add(privatePool);