assertNotNull(cookie.getExpiryDate());
}
public void testBasicExpiresParseInvalid() throws Exception {
BasicClientCookie cookie = new BasicClientCookie("name", "value");
CookieAttributeHandler h = new BasicExpiresHandler(new String[] {DateUtils.PATTERN_RFC1123});
try {
h.parse(cookie, "garbage");
fail("MalformedCookieException must have been thrown");
} catch (MalformedCookieException ex) {
// expected
}
try {
h.parse(cookie, null);
fail("MalformedCookieException must have been thrown");
} catch (MalformedCookieException ex) {
// expected
}
}