protected final void fail(
                final CompletionHandler handler,
                final Throwable failure,
                final Class<?>... allowedExceptionTypes) {
            try {
                handler.failed(failure);
            } catch (Throwable t) {
                if (!isInstanceOfAnyOf(t, allowedExceptionTypes)) {
                    throw t;
                }
            }
        }
Wrapper around CountDownLatch for single-occurrence events.
jdisc_core/src/main/java/com/yahoo/jdisc/test/ServerProviderConformanceTest.java