@@ -0,0 +1,2946 @@
+package com.github.davidmoten.rx2.flowable;%0A%0Aimport org.reactivestreams.Subscriber;%0Aimport org.reactivestreams.Subscription;%0A%0Aimport io.reactivex.Flowable;%0Aimport io.reactivex.FlowableSubscriber;%0Aimport io.reactivex.internal.subscriptions.SubscriptionHelper;%0A%0Apublic final class FlowableDoNothing%3CT%3E extends Flowable%3CT%3E %7B%0A%0A    private final Flowable%3CT%3E source;%0A%0A    public FlowableDoNothing(Flowable%3CT%3E source) %7B%0A        this.source = source;%0A    %7D%0A%0A    @Override%0A    protected void subscribeActual(Subscriber%3C? super T%3E downstream) %7B%0A        source.subscribe(new DoNothingSubscriber%3CT%3E(downstream));%0A    %7D%0A%0A    static final class DoNothingSubscriber%3CT%3E implements //%0A            // receives onSubscribe then onNext + terminal events from upstream%0A            FlowableSubscriber%3CT%3E, //%0A            // receives request and cancellation calls from downstream%0A            Subscription %7B%0A%0A        private final Subscriber%3C? super T%3E downstream;%0A        private Subscription upstream;%0A%0A        DoNothingSubscriber(Subscriber%3C? super T%3E downstream) %7B%0A            this.downstream = downstream;%0A        %7D%0A%0A        @Override%0A        public void onSubscribe(Subscription upstream) %7B%0A            // this method is responsible for notifying downstream%0A            // where to send requests and cancellation by calling%0A            // downstream.onSubscribe with a Subscription object%0A            // (we reuse %60this%60)%0A%0A            if (SubscriptionHelper.validate(this.upstream, upstream)) %7B%0A                downstream.onSubscribe(this);%0A            %7D%0A        %7D%0A%0A        @Override%0A        public void onNext(T t) %7B%0A            // pass emission through to downstream%0A%0A            // note downstream is not null because onSubscribe call%0A            // must finish before events arrive (contractual)%0A            downstream.onNext(t);%0A        %7D%0A%0A        @Override%0A        public void onError(Throwable t) %7B%0A            // pass emission through to downstream%0A            downstream.onError(t);%0A        %7D%0A%0A        @Override%0A        public void onComplete() %7B%0A            // pass emission through to downstream%0A            downstream.onComplete();%0A        %7D%0A%0A        @Override%0A        public void request(long n) %7B%0A            // requests received from downstream are passed to upstream%0A%0A            // note that upstream is non-null because by specification%0A            // onSubscribe must terminate before request or cancel is%0A            // called on the Subscription passed into onSubscribe.%0A            if (SubscriptionHelper.validate(n)) %7B%0A                upstream.request(n);%0A            %7D%0A        %7D%0A%0A        @Override%0A        public void cancel() %7B%0A            // a cancellation call from downstream%0A%0A            // note that upstream is non-null because by specification%0A            // onSubscribe must terminate before request or cancel is%0A            // called on the Subscription passed into onSubscribe.%0A            upstream.cancel();%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

add FlowableDoNothing to tests