@Test
    void requireThatSetCookieCanBeDecoded() {
        final Cookie foo = new Cookie();
        foo.setName("foo.name");
        foo.setValue("foo.value");
        foo.setPath("path");
        foo.setDomain("domain");
        foo.setMaxAge(0, TimeUnit.SECONDS);
        foo.setSecure(true);
        foo.setHttpOnly(true);
        assertDecodeSetCookie(foo, "foo.name=foo.value;Max-Age=0;Path=path;Domain=domain;Secure;HTTPOnly;");

        final Cookie bar = new Cookie();
        bar.setName("bar.name");
        bar.setValue("bar.value");
        bar.setPath("path");
        bar.setDomain("domain");
        bar.setMaxAge(0, TimeUnit.SECONDS);
        assertDecodeSetCookie(bar, "bar.name=bar.value;Max-Age=0;Path=path;Domain=domain;");
    }
@author Simon Thoresen Hult
@author bjorncs
container-core/src/test/java/com/yahoo/jdisc/http/CookieTestCase.java