BasicClientCookie c4 = new BasicClientCookie("name2", "value");
assertFalse(comparator.compare(c3, c4) == 0);
}
public void testCookieIdentityComparasionByNameAndDomain() {
CookieIdentityComparator comparator = new CookieIdentityComparator();
BasicClientCookie c1 = new BasicClientCookie("name", "value1");
c1.setDomain("www.domain.com");
BasicClientCookie c2 = new BasicClientCookie("name", "value2");
c2.setDomain("www.domain.com");
assertTrue(comparator.compare(c1, c2) == 0);
BasicClientCookie c3 = new BasicClientCookie("name", "value1");
c3.setDomain("www.domain.com");
BasicClientCookie c4 = new BasicClientCookie("name", "value2");
c4.setDomain("domain.com");
assertFalse(comparator.compare(c3, c4) == 0);
}