// expected
}
}
public void testPublicSuffixFilter() throws Exception {
BasicClientCookie cookie = new BasicClientCookie("name", "value");
PublicSuffixFilter h = new PublicSuffixFilter(new RFC2109DomainHandler());
h.setPublicSuffixes(Arrays.asList(new String[] { "co.uk", "com" }));
cookie.setDomain(".co.uk");
assertFalse(h.match(cookie, new CookieOrigin("apache.co.uk", 80, "/stuff", false)));
cookie.setDomain("co.uk");
assertFalse(h.match(cookie, new CookieOrigin("apache.co.uk", 80, "/stuff", false)));
cookie.setDomain(".com");
assertFalse(h.match(cookie, new CookieOrigin("apache.com", 80, "/stuff", false)));
cookie.setDomain("com");
assertFalse(h.match(cookie, new CookieOrigin("apache.com", 80, "/stuff", false)));
cookie.setDomain("localhost");
assertTrue(h.match(cookie, new CookieOrigin("localhost", 80, "/stuff", false)));
}