@Test public void maxAge() throws Exception { assertThat(parseCookie(50000L, "a=b; Max-Age=1").getExpiresAt()) .isEqualTo(51000L); assertThat(parseCookie(50000L, "a=b; Max-Age=9223372036854724").getExpiresAt()) .isEqualTo(MAX_DATE); assertThat(parseCookie(50000L, "a=b; Max-Age=9223372036854725").getExpiresAt()) .isEqualTo(MAX_DATE); assertThat(parseCookie(50000L, "a=b; Max-Age=9223372036854726").getExpiresAt()) .isEqualTo(MAX_DATE); assertThat(parseCookie(9223372036854773807L, "a=b; Max-Age=1").getExpiresAt()) .isEqualTo(MAX_DATE); assertThat(parseCookie(9223372036854773807L, "a=b; Max-Age=2").getExpiresAt()) .isEqualTo(MAX_DATE); assertThat(parseCookie(9223372036854773807L, "a=b; Max-Age=3").getExpiresAt()) .isEqualTo(MAX_DATE); assertThat(parseCookie(50000L, "a=b; Max-Age=10000000000000000000").getExpiresAt()) .isEqualTo(MAX_DATE); assertThat(parseCookie(50000L, "a=b; Max-Age=For-Eva").getExpiresAt()) .isEqualTo(MAX_DATE); }
public long getExpiresAt() { return expiresAt; }
Cookie { public long getExpiresAt() { return expiresAt; } }
Cookie { public long getExpiresAt() { return expiresAt; } private  Cookie(String name, String value, long expiresAt, String domain, String path,
                   boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private  Cookie(Builder builder); }
Cookie { public long getExpiresAt() { return expiresAt; } private  Cookie(String name, String value, long expiresAt, String domain, String path,
                   boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private  Cookie(Builder builder); String getName(); String getValue(); boolean getPersistent(); long getExpiresAt(); boolean getHostOnly(); String getDomain(); String getPath(); boolean getHttpOnly(); boolean getSecure(); static List<Cookie> parseAll(List<String> cookieStrings); static Cookie parse(String setCookie); @Override String toString(); boolean similarTo(Cookie other); @Override boolean equals(Object other); @Override int hashCode(); }
Cookie { public long getExpiresAt() { return expiresAt; } private  Cookie(String name, String value, long expiresAt, String domain, String path,
                   boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private  Cookie(Builder builder); String getName(); String getValue(); boolean getPersistent(); long getExpiresAt(); boolean getHostOnly(); String getDomain(); String getPath(); boolean getHttpOnly(); boolean getSecure(); static List<Cookie> parseAll(List<String> cookieStrings); static Cookie parse(String setCookie); @Override String toString(); boolean similarTo(Cookie other); @Override boolean equals(Object other); @Override int hashCode();  }