assertTrue(cookie.isSecure());
}
public void testBasicSecureMatch() throws Exception {
BasicClientCookie cookie = new BasicClientCookie("name", "value");
CookieAttributeHandler h = new BasicSecureHandler();
CookieOrigin origin1 = new CookieOrigin("somehost", 80, "/stuff", false);
cookie.setSecure(false);
assertTrue(h.match(cookie, origin1));
cookie.setSecure(true);
assertFalse(h.match(cookie, origin1));
CookieOrigin origin2 = new CookieOrigin("somehost", 80, "/stuff", true);
cookie.setSecure(false);
assertTrue(h.match(cookie, origin2));
cookie.setSecure(true);
assertTrue(h.match(cookie, origin2));
}