### Question:
SingleFromCompletionStage extends CompletionSingle<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { MultiFromCompletionStage.subscribe(subscriber, source, nullMeansEmpty); } SingleFromCompletionStage(CompletionStage<T> source, boolean nullMeansEmpty); @Override void subscribe(Flow.Subscriber<? super T> subscriber); @Override Single<T> cancel();  }### Answer:
@Test public void nullItemDisallowed() { TestSubscriber<Object> ts = new TestSubscriber<>(); Single.create(CompletableFuture.completedStage(null)) .subscribe(ts); ts.assertFailure(NullPointerException.class); }
@Test public void nullItemDisallowed2() { TestSubscriber<Object> ts = new TestSubscriber<>(); Single.create(CompletableFuture.completedStage(null), false) .subscribe(ts); ts.assertFailure(NullPointerException.class); }
@Test public void nullItemMeansEmpty() { TestSubscriber<Object> ts = new TestSubscriber<>(); Single.create(CompletableFuture.completedStage(null), true) .subscribe(ts); ts.assertResult(); }