code: public static <T> CompletableFuture<T> delayedTask(final Supplier<T> task,
                                                         final Duration delay,
                                                         final ScheduledExecutorService executorService) {
          CompletableFuture<T> result = new CompletableFuture<>();
          executorService.schedule(() -> result.complete(runOrFail(() -> task.get(), result)),
                  delay.toMillis(),
                  TimeUnit.MILLISECONDS);
          return result;
      }
docs: Executes the given task after the specified delay.
  
  @param task            Asynchronous task.
  @param delay           Delay.
  @param executorService Executor on which to execute the task.
  @param <T>             Type parameter.
  @return A CompletableFuture that will be completed with the result of the given task, or completed exceptionally
  if the task fails.