code: public void copySeleniumCookies(Set<Cookie> browserCookies, CookieStore cookieStore) {
          for (Cookie browserCookie : browserCookies) {
              ClientCookie cookie = convertCookie(browserCookie);
              cookieStore.addCookie(cookie);
          }
      }
docs: Converts Selenium cookies to Apache http client ones.
  @param browserCookies cookies in Selenium format.
  @param cookieStore store to place coverted cookies in.