@Test public void willNotModifyMaxAgeIfPositive() { String cookieValue = "hp_pos=\"\"; Domain=.dev-hotels.com; Max-Age=50; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/"; Cookie cookie = ClientCookieDecoder.LAX.decode(cookieValue); assertThat(cookie.maxAge(), is(50L)); assertThat(ServerCookieEncoder.LAX.encode(cookie), containsString("Max-Age=50")); }
String encode(String name, String value) { return encode(new DefaultCookie(name, value)); }
ServerCookieEncoder extends CookieEncoder { String encode(String name, String value) { return encode(new DefaultCookie(name, value)); } }
ServerCookieEncoder extends CookieEncoder { String encode(String name, String value) { return encode(new DefaultCookie(name, value)); } private  ServerCookieEncoder(boolean strict); }
ServerCookieEncoder extends CookieEncoder { String encode(String name, String value) { return encode(new DefaultCookie(name, value)); } private  ServerCookieEncoder(boolean strict);  }
ServerCookieEncoder extends CookieEncoder { String encode(String name, String value) { return encode(new DefaultCookie(name, value)); } private  ServerCookieEncoder(boolean strict);   }