class FutureSubscriber extends CountDownLatch implements FlowableSubscriber<T>, Future<T>, Subscription {

    @Override
    public void onNext(T t) {
        if (value != null) {
            s.get().cancel();
            onError(new IndexOutOfBoundsException("More than one element received"));
            return;
        }
        value = t;
    }

    public  FutureSubscriber();

}