Cookie implements Cloneable, Serializable { public int getVersion() { return version; } 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 testGetVersion() { Cookie cookie = new Cookie("name", "value"); assertEquals(0, cookie.getVersion()); cookie.setVersion(10); assertEquals(10, cookie.getVersion()); }