@Test public void completableFromSourceError() throws Exception { CompletableSource src = s -> { s.onSubscribe(IGNORE_CANCEL); s.onError(DELIBERATE_EXCEPTION); }; Future<Void> future = fromSource(src).toFuture(); expectedException.expect(ExecutionException.class); expectedException.expectCause(sameInstance(DELIBERATE_EXCEPTION)); future.get(); }
public static <T> Publisher<T> fromSource(PublisherSource<T> source) { if (source instanceof Publisher) { return uncheckedCast(source); } return new PublisherSourceToPublisher<>(source); }
SourceAdapters { public static <T> Publisher<T> fromSource(PublisherSource<T> source) { if (source instanceof Publisher) { return uncheckedCast(source); } return new PublisherSourceToPublisher<>(source); } }
SourceAdapters { public static <T> Publisher<T> fromSource(PublisherSource<T> source) { if (source instanceof Publisher) { return uncheckedCast(source); } return new PublisherSourceToPublisher<>(source); } private  SourceAdapters(); }
SourceAdapters { public static <T> Publisher<T> fromSource(PublisherSource<T> source) { if (source instanceof Publisher) { return uncheckedCast(source); } return new PublisherSourceToPublisher<>(source); } private  SourceAdapters(); static PublisherSource<T> toSource(Publisher<T> publisher); static SingleSource<T> toSource(Single<T> single); static CompletableSource toSource(Completable completable); static Publisher<T> fromSource(PublisherSource<T> source); static Single<T> fromSource(SingleSource<T> source); static Completable fromSource(CompletableSource source); }
SourceAdapters { public static <T> Publisher<T> fromSource(PublisherSource<T> source) { if (source instanceof Publisher) { return uncheckedCast(source); } return new PublisherSourceToPublisher<>(source); } private  SourceAdapters(); static PublisherSource<T> toSource(Publisher<T> publisher); static SingleSource<T> toSource(Single<T> single); static CompletableSource toSource(Completable completable); static Publisher<T> fromSource(PublisherSource<T> source); static Single<T> fromSource(SingleSource<T> source); static Completable fromSource(CompletableSource source);  }