### Question:
Eventual implements Publisher<T> { public static <T> Eventual<T> from(CompletionStage<T> completionStage) { return fromMono(Mono.fromCompletionStage(completionStage)); } Eventual(Publisher<T> publisher); static Eventual<T> of(T value); static Eventual<T> from(CompletionStage<T> completionStage); static Eventual<T> error(Throwable error); Eventual<R> map(Function<? super T, ? extends R> transformation); Eventual<R> flatMap(Function<? super T, ? extends Eventual<? extends R>> transformation); Eventual<T> onError(Function<Throwable, ? extends Eventual<? extends T>> errorHandler); @Override void subscribe(Subscriber<? super T> subscriber);  }### Answer:
@Test public void createFromPublisher() { String value = Mono.from(new Eventual<>(Flux.just("hello"))).block(); assertEquals(value, "hello"); }
@Test public void createFromCompletionStage() { CompletableFuture<String> future = new CompletableFuture<>(); Eventual<String> eventual = Eventual.from(future); StepVerifier.create(eventual) .thenRequest(1) .expectNextCount(0) .then(() -> future.complete("hello")) .expectNext("hello") .verifyComplete(); }