public ObservableSubscriber<T> await(final long timeout, final TimeUnit unit) throws Throwable {
            subscription.request(Integer.MAX_VALUE);
            if (!latch.await(timeout, unit)) {
                throw new MongoTimeoutException("Publisher onComplete timed out");
            }
            if (!errors.isEmpty()) {
                throw errors.get(0);
            }
            return this;
        }
A Subscriber that stores the publishers results and provides a latch so can block on completion.

@param <T> The publishers result type
agent-module/agent-testweb/mongodb-reactive-plugin-testweb/src/main/java/com/pinpoint/test/plugin/SubscriberHelpers.java