@Test
void saveFromResponse() {

    HttpUrl url = HttpUrl.get("http://localhost/");
    Cookie cookie1 = Cookie.parse(url, "key1=v1; Path=/;"); // session scope
    Cookie cookie2 = Cookie.parse(url, "key2=v2; Domain=localhost; Max-Age=7200;");
    cookieManager.saveFromResponse(url, List.of(cookie1, cookie2));
    assertThat(cookieManager.store).hasSize(2);
    cookie1 = Cookie.parse(url, "key1=; Path=/; Max-Age=0;");
    cookieManager.saveFromResponse(url, List.of(cookie1));
    assertThat(cookieManager.store).hasSize(1);
}