code: private Optional<String> getXsrfCookie() {
          Optional<Cookie> xsrfCookie = findCookie("XSRF_TOKEN");
          if (xsrfCookie.isPresent()) {
              return Optional.of(xsrfCookie.get().getValue());
          }
          return Optional.absent();
      }
docs: In Gerrit >= 2.12 the XSRF token got moved to a cookie.
  Introduced in: https://gerrit-review.googlesource.com/72031/