### Question:
RXTool { public static <T> Single<T> executeBlocking(Handler<Future<T>> blockingCodeHandler, Vertx vertx) { return vertx.rxExecuteBlocking(blockingCodeHandler); } private  RXTool(); static Single<T> executeBlocking(Handler<Future<T>> blockingCodeHandler, Vertx
        vertx); static Observable<T> executeBlockingObservable(Handler<Future<List<T>>> blockingCodeHandler, Vertx
        vertx); static Single<T> failure(Throwable e); static io.reactivex.functions.Function<T,R> toFunction(Function<T,R> f);  }### Answer:
@Test public void executeBlockingShouldCompleteSingle() throws InterruptedException { CountDownLatch countDownLatch = new CountDownLatch(1); RXTool.executeBlocking(h -> { }, vertx) .subscribe(v -> countDownLatch.countDown()); countDownLatch.await(1, TimeUnit.SECONDS); }
@Test public void executeBlockingShouldFailSingleOnException() throws InterruptedException { CountDownLatch countDownLatch = new CountDownLatch(1); RXTool.executeBlocking(h -> { throw new RuntimeException("Expected"); }, vertx) .subscribe( v -> { throw new RuntimeException("Should not be called"); }, t -> countDownLatch.countDown()); countDownLatch.await(1, TimeUnit.SECONDS); }
@Test public void executeBlockingShouldFailSingleOnFailure() throws InterruptedException { CountDownLatch countDownLatch = new CountDownLatch(1); RXTool.executeBlocking(h -> h.fail("Expected"), vertx) .subscribe( v -> { throw new RuntimeException("Should not be called"); }, t -> countDownLatch.countDown()); countDownLatch.await(1, TimeUnit.SECONDS); }