public @NotNull Future<@NotNull Boolean> setCookie(@NotNull String url, @NotNull JBCefCookie jbCefCookie) {
    if (!checkArgs(url, jbCefCookie)) {
      return CompletableFuture.completedFuture(false);
    }
    if (!myCefCookieManager.setCookie(url, jbCefCookie.getCefCookie())) {
      LOG.error("Posting task to set cookie is failed");
      return CompletableFuture.completedFuture(false);
    }
    Ref<Future<@NotNull Boolean>> futureRef = new Ref<>();
    futureRef.set(myExecutorService.submit(() -> {
      while (futureRef.get() == null || !futureRef.get().isDone()) {
        if (getCookies(url, null, BOUNCE_TIMEOUT_MS).contains(jbCefCookie)) {
          return true;
        }
      }
      return false;
    }));
    return futureRef.get();
  }
public @NotNull Future<@NotNull Boolean> setCookie(@NotNull String url, @NotNull JBCefCookie jbCefCookie)