cookie.setDomain(null);
assertFalse(h.match(cookie, origin));
}
public void testBasicDomainInvalidInput() throws Exception {
CookieAttributeHandler h = new BasicDomainHandler();
try {
h.parse(null, null);
fail("IllegalArgumentException must have been thrown");
} catch (IllegalArgumentException ex) {
// expected
}
try {
h.validate(null, null);
fail("IllegalArgumentException must have been thrown");
} catch (IllegalArgumentException ex) {
// expected
}
try {
h.validate(new BasicClientCookie("name", "value"), null);
fail("IllegalArgumentException must have been thrown");
} catch (IllegalArgumentException ex) {
// expected
}
try {
h.match(null, null);
fail("IllegalArgumentException must have been thrown");
} catch (IllegalArgumentException ex) {
// expected
}
try {
h.match(new BasicClientCookie("name", "value"), null);
fail("IllegalArgumentException must have been thrown");
} catch (IllegalArgumentException ex) {
// expected
}
}