assertEquals(1, headers.length);
assertEquals("$Version=0; name=", headers[0].getValue());
}
public void testCookieOrderingByPath() {
Cookie c1 = new Cookie("name1", "value1");
c1.setPath("/a/b/c");
c1.setPathAttributeSpecified(true);
Cookie c2 = new Cookie("name2", "value2");
c2.setPath("/a/b");
c2.setPathAttributeSpecified(true);
Cookie c3 = new Cookie("name3", "value3");
c3.setPath("/a");
c3.setPathAttributeSpecified(true);
Cookie c4 = new Cookie("name4", "value4");
c4.setPath("/");
c4.setPathAttributeSpecified(true);
CookieSpec cookiespec = new RFC2109Spec(null, true);
Header[] headers = cookiespec.formatCookies(new Cookie[] { c2, c4, c1, c3 });
assertNotNull(headers);
assertEquals(1, headers.length);