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