@Test public void fromRSCancel() { AtomicReference<Subscription> receivedSubscription = new AtomicReference<>(); Publisher<Integer> rsPublisher = newMockRsPublisher((__, subscription) -> receivedSubscription.set(subscription)); fromReactiveStreamsPublisher(rsPublisher).firstOrElse(() -> null).toFuture().cancel(true); Subscription subscription = receivedSubscription.get(); assertThat("Subscription not received.", subscription, is(notNullValue())); verify(subscription).cancel(); }
public static <T> Publisher<T> fromReactiveStreamsPublisher(org.reactivestreams.Publisher<T> source) { return new RsToStPublisher<>(source); }
ReactiveStreamsAdapters { public static <T> Publisher<T> fromReactiveStreamsPublisher(org.reactivestreams.Publisher<T> source) { return new RsToStPublisher<>(source); } }
ReactiveStreamsAdapters { public static <T> Publisher<T> fromReactiveStreamsPublisher(org.reactivestreams.Publisher<T> source) { return new RsToStPublisher<>(source); } private  ReactiveStreamsAdapters(); }
ReactiveStreamsAdapters { public static <T> Publisher<T> fromReactiveStreamsPublisher(org.reactivestreams.Publisher<T> source) { return new RsToStPublisher<>(source); } private  ReactiveStreamsAdapters(); static Publisher<T> fromReactiveStreamsPublisher(org.reactivestreams.Publisher<T> source); static org.reactivestreams.Publisher<T> toReactiveStreamsPublisher(Publisher<T> publisher); static org.reactivestreams.Publisher<T> toReactiveStreamsPublisher(PublisherSource<T> source); }
ReactiveStreamsAdapters { public static <T> Publisher<T> fromReactiveStreamsPublisher(org.reactivestreams.Publisher<T> source) { return new RsToStPublisher<>(source); } private  ReactiveStreamsAdapters(); static Publisher<T> fromReactiveStreamsPublisher(org.reactivestreams.Publisher<T> source); static org.reactivestreams.Publisher<T> toReactiveStreamsPublisher(Publisher<T> publisher); static org.reactivestreams.Publisher<T> toReactiveStreamsPublisher(PublisherSource<T> source);  }