}
public void testParseSimple2() throws Exception {
Header header = new BasicHeader("Set-Cookie", "cookie-name=cookie-value");
CookieSpec cookiespec = new BrowserCompatSpec();
CookieOrigin origin = new CookieOrigin("127.0.0.1", 80, "/path", false);
List<Cookie> cookies = cookiespec.parse(header, origin);
for (int i = 0; i < cookies.size(); i++) {
cookiespec.validate(cookies.get(i), origin);
}
assertEquals("Found 1 cookie.", 1, cookies.size());
assertEquals("Name", "cookie-name", cookies.get(0).getName());
assertEquals("Value", "cookie-value", cookies.get(0).getValue());
assertTrue("Comment", null == cookies.get(0).getComment());