private String getCookiesHeaderValue(Set<Cookie> cookies) {
    StringBuilder cookieStr = new StringBuilder();
    for (Cookie cookie : cookies) {
      if (cookieStr.length() != 0) {
        cookieStr.append("; ");
      }
      cookieStr.append(cookie.name()).append("=").append(cookie.value());
    }
    return cookieStr.toString();
  }
Convert a set of {@link Cookie} to a string that could be used as header value in http request
@param cookies that needs conversion
@return string representation of the set of cookies
ambry-rest/src/test/java/com/github/ambry/rest/NettyRequestTest.java