private static AsyncFuture<Boolean> createConst(final boolean result) {
    return new AsyncFuture<Boolean>() {
      @Override
      public void addConsumer(@NotNull Executor executor, @NotNull ResultConsumer<? super Boolean> consumer) {
        consumer.onSuccess(result);
      }

      @Override
      public boolean cancel(boolean mayInterruptIfRunning) {
        return false;
      }

      @Override
      public boolean isCancelled() {
        return false;
      }

      @Override
      public boolean isDone() {
        return true;
      }

      @Override
      public Boolean get() {
        return result;
      }

      @Override
      public Boolean get(long timeout, @NotNull TimeUnit unit) {
        return result;
      }
    };
  }
private static AsyncFuture<Boolean> createConst(final boolean result)