@Test
public void testToString() throws Exception {

    NewCookie cookie = new NewCookie("foo",
                                     "bar",
                                     "/aaa",
                                     "andrew.com",
                                     1,
                                     "comment",
                                     300,
                                     date(2010, 1, 8, 2, 5, 0, "EET"),
                                     true,
                                     true);
    assertEquals("foo=bar;Version=1;Comment=comment;Domain=andrew.com;Path=/aaa;Max-Age=300;Expires=Fri, 08 Jan 2010 00:05:00 GMT;Secure;HttpOnly",
                 newCookieHeaderDelegate.toString(cookie));
}