public static <T>CompletableFuture<T> completedFutureAsync(T result,Executor executor){
  CompletableFuture<T> future=new CompletableFuture<>();
  executor.execute(null);
  return future;
}

public static < T > CompletableFuture < T > completedFutureAsync ( T result , Executor executor ) { CompletableFuture < T > future = new CompletableFuture < > ( ) ; executor . execute ( null ) ; return future ; }
creates a future that is asynchronously completed .
