@Test
    void requireThatCopyConstructorWorks() {
        final Cookie lhs = newSetCookie("foo");
        final Cookie rhs = new Cookie(lhs);
        assertEquals(rhs.getName(), rhs.getName());
        assertEquals(rhs.getValue(), rhs.getValue());
        assertEquals(rhs.getDomain(), rhs.getDomain());
        assertEquals(rhs.getPath(), rhs.getPath());
        assertEquals(rhs.getMaxAge(TimeUnit.MILLISECONDS), rhs.getMaxAge(TimeUnit.MILLISECONDS));
        assertEquals(rhs.isSecure(), rhs.isSecure());
        assertEquals(rhs.isHttpOnly(), rhs.isHttpOnly());
    }
@author Simon Thoresen Hult
@author bjorncs
container-core/src/test/java/com/yahoo/jdisc/http/CookieTestCase.java