Cookie implements Cloneable, Serializable { public boolean getSecure() { return secure; } Cookie(String name, String value); @Override Object clone(); String getComment(); String getDomain(); int getMaxAge(); String getName(); String getPath(); boolean getSecure(); String getValue(); int getVersion(); boolean isHttpOnly(); void setComment(String comment); void setDomain(String domain); void setHttpOnly(boolean httpOnly); void setMaxAge(int maxAge); void setPath(String path); void setSecure(boolean secure); void setValue(String value); void setVersion(int version);  }
@Test void testGetSecure() { Cookie cookie = new Cookie("name", "value"); assertFalse(cookie.getSecure()); cookie.setSecure(true); assertTrue(cookie.getSecure()); }