### Question:
SingleObserveOn extends CompletionSingle<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new ObserveOnSubscriber<>(subscriber, executor)); } SingleObserveOn(Single<T> source, Executor executor); @Override void subscribe(Flow.Subscriber<? super T> subscriber);  }### Answer:
@Test public void empty() { TestSubscriber<Object> ts = new TestSubscriber<>(); Single.empty() .observeOn(executor) .subscribe(ts); ts.awaitDone(5, TimeUnit.SECONDS) .assertResult(); }
@Test public void zeroRequest() { TestSubscriber<Object> ts = new TestSubscriber<>(); Single.never() .observeOn(executor) .subscribe(ts); ts.getSubcription().request(0L); ts.awaitDone(5, TimeUnit.SECONDS) .assertFailure(IllegalArgumentException.class); }
@Test public void negativeRequest() { TestSubscriber<Object> ts = new TestSubscriber<>(); Single.never() .observeOn(executor) .subscribe(ts); ts.getSubcription().request(-1L); ts.awaitDone(5, TimeUnit.SECONDS) .assertFailure(IllegalArgumentException.class); }