Cookie implements Cloneable, Serializable { public String getPath() { return path; } 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 testGetPath() { Cookie cookie = new Cookie("name", "value"); assertNull(cookie.getPath()); cookie.setPath("path"); assertEquals("path", cookie.getPath()); }