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