code: public static Cookie getCookie(final Collection<Cookie> cookies, final String name) {
          if (cookies != null) {
              for (final Cookie cookie : cookies) {
                  if (cookie != null && CommonHelper.areEquals(name, cookie.getName())) {
                      return cookie;
                  }
              }
          }
          return null;
      }
docs: Get a specific cookie by its name.
  
  @param cookies provided cookies
  @param name the name of the cookie
  @return the cookie