@Test public void testFromCompletionStageNotDeferred() throws InterruptedException { final CountDownLatch latch = new CountDownLatch(1); final Mono<?> mono = provider.fromCompletionStage(someAsyncMethod(latch)); assertTrue(latch.await(1, TimeUnit.SECONDS)); assertEquals("Hello!", mono.block()); assertEquals(0, latch.getCount()); }
@Override public Mono<?> fromCompletionStage(final CompletionStage<?> completionStage) { return Mono.fromFuture(completionStage.toCompletableFuture()); }
MonoProvider implements AsyncResponseProvider<Mono<?>>, AsyncClientResponseProvider<Mono<?>> { @Override public Mono<?> fromCompletionStage(final CompletionStage<?> completionStage) { return Mono.fromFuture(completionStage.toCompletableFuture()); } }
MonoProvider implements AsyncResponseProvider<Mono<?>>, AsyncClientResponseProvider<Mono<?>> { @Override public Mono<?> fromCompletionStage(final CompletionStage<?> completionStage) { return Mono.fromFuture(completionStage.toCompletableFuture()); }  }
MonoProvider implements AsyncResponseProvider<Mono<?>>, AsyncClientResponseProvider<Mono<?>> { @Override public Mono<?> fromCompletionStage(final CompletionStage<?> completionStage) { return Mono.fromFuture(completionStage.toCompletableFuture()); }  @Override CompletionStage<?> toCompletionStage(final Mono<?> asyncResponse); @Override Mono<?> fromCompletionStage(final CompletionStage<?> completionStage); @Override Mono<?> fromCompletionStage(final Supplier<CompletionStage<?>> completionStageSupplier); }
MonoProvider implements AsyncResponseProvider<Mono<?>>, AsyncClientResponseProvider<Mono<?>> { @Override public Mono<?> fromCompletionStage(final CompletionStage<?> completionStage) { return Mono.fromFuture(completionStage.toCompletableFuture()); }  @Override CompletionStage<?> toCompletionStage(final Mono<?> asyncResponse); @Override Mono<?> fromCompletionStage(final CompletionStage<?> completionStage); @Override Mono<?> fromCompletionStage(final Supplier<CompletionStage<?>> completionStageSupplier);  }