public void reset(final Iterable<ByteBuffer> responseContent) {
            synchronized (taskMonitor) {
                if (!pendingTasks.isEmpty()) {
                    throw new AssertionError("pendingTasks should be empty, was " + pendingTasks);
                }
            }
            this.executor = Executors.newCachedThreadPool();
            this.responseWritten = new Event();
            this.responseClosed = new Event();
            this.responseContent = responseContent;
            this.taskException = null;
        }
Wrapper around CountDownLatch for single-occurrence events.
jdisc_core/src/main/java/com/yahoo/jdisc/test/ServerProviderConformanceTest.java