EventLoopCheckingFuture extends CompletableFuture<T> { @Override public T get() throws InterruptedException, ExecutionException { maybeLogIfOnEventLoop(); return super.get(); }  static EventLoopCheckingFuture<U> completedFuture(@Nullable U value); static EventLoopCheckingFuture<U> exceptionallyCompletedFuture(Throwable cause); @Override T get(); @Override T get(long timeout, TimeUnit unit); @Override T join();  }
@Test void getTimeoutOnEventLoop() { testBlockingOperationOnEventLoop(future -> future.get(10, TimeUnit.SECONDS)); }
@Test void getTimeoutOnEventLoopAfterCompletion() { testBlockingOperationOnEventLoopAfterCompletion(future -> future.get(10, TimeUnit.SECONDS)); }
@Test void getTimeoutOffEventLoop() throws Exception { testBlockingOperationOffEventLoop(future -> future.get(10, TimeUnit.SECONDS)); }