RxJava3Adapter { public static Completable monoToCompletable(Mono<?> source) { return new CompletableFromPublisher<>(source); } RxJava3Adapter(); static Flux<T> flowableToFlux(Flowable<T> source); static Flowable<T> fluxToFlowable(Flux<T> source); static Flowable<T> monoToFlowable(Mono<T> source); static Completable monoToCompletable(Mono<?> source); static Completable monoToCompletable(Mono<T> source, Consumer<T> discardHandler); static Mono<Void> completableToMono(Completable source); static Single<T> monoToSingle(Mono<T> source); static Mono<T> singleToMono(Single<T> source); static Flux<T> observableToFlux(Observable<T> source, BackpressureStrategy strategy); static Observable<T> fluxToObservable(Flux<T> source); static Mono<T> maybeToMono(Maybe<T> source); static Maybe<T> monoToMaybe(Mono<T> source);  }
@Test public void monoValuedToCompletableDiscards() { List<String> discarded = new CopyOnWriteArrayList<>(); Mono.just("foo") .as(m -> RxJava3Adapter.monoToCompletable(m, discarded::add)) .test() .assertNoValues() .assertNoErrors() .assertComplete(); assertThat(discarded).containsExactly("foo"); }