@Test public void singleCookieWithPathAndDomain(){ String aValueWithMultipleCookies = "JSESSIONID=abcFzcwh5FefNdVW1cVlt;$Path=/path/to/file;$Domain=abc.def.com"; CookieField field = new CookieField(aValueWithMultipleCookies); Assert.assertEquals(1, field.cookies().size()); Assert.assertEquals("JSESSIONID", field.cookies().get(0).name); Assert.assertEquals("abcFzcwh5FefNdVW1cVlt", field.cookies().get(0).value); Assert.assertEquals("/path/to/file", field.cookies().get(0).path); Assert.assertEquals("abc.def.com", field.cookies().get(0).domain); }
public List<Cookie> cookies() { return cookies; }
CookieField extends HeaderField { public List<Cookie> cookies() { return cookies; } }
CookieField extends HeaderField { public List<Cookie> cookies() { return cookies; } CookieField(String fieldValue);  CookieField(Cookie ... cookies); }
CookieField extends HeaderField { public List<Cookie> cookies() { return cookies; } CookieField(String fieldValue);  CookieField(Cookie ... cookies); @Override T accept(HeaderFieldVisitor<T> visitor); @Override String name(); List<Cookie> cookies(); @Override String value(); }
CookieField extends HeaderField { public List<Cookie> cookies() { return cookies; } CookieField(String fieldValue);  CookieField(Cookie ... cookies); @Override T accept(HeaderFieldVisitor<T> visitor); @Override String name(); List<Cookie> cookies(); @Override String value();  }