HttpCookie { public static HttpCookie of(String name, String value) { return new HttpCookie(name, value); } private  HttpCookie(String name, String value); private  HttpCookie(String name, String value, String path); static HttpCookie of(String name, String value); static HttpCookie of(String name); HttpCookie withValue(String value); HttpCookie withExpirationDate(Instant expirationDate); HttpCookie withMaxAge(int maxAge); HttpCookie withMaxAge(Duration maxAge); HttpCookie withDomain(String domain); HttpCookie withPath(String path); HttpCookie withSecure(boolean secure); HttpCookie withHttpOnly(boolean httpOnly); HttpCookie withExtension(String extension); String getName(); String getValue(); void setValue(String value); Instant getExpirationDate(); void setExpirationDate(Instant expirationDate); int getMaxAge(); void setMaxAge(int maxAge); void setMaxAge(Duration maxAge); String getDomain(); void setDomain(String domain); String getPath(); void setPath(String path); boolean isSecure(); void setSecure(boolean secure); boolean isHttpOnly(); void setHttpOnly(boolean httpOnly); String getExtension(); void setExtension(String extension); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testCommaDelimiter() { HttpResponse response = HttpResponse.ofCode(200); response.addCookies(asList(HttpCookie.of("key1", "value1"), HttpCookie.of("key2", "value2"))); assertEquals(2, response.getCookies().size()); }