@ParameterizedTest
    @ValueSource(strings = {"-1", "5000", "PT1H"})
    void verifyCookieMaxAge(final String maxAge) {
        val request = new MockHttpServletRequest();
        val response = new MockHttpServletResponse();
        val cookieValueManager = new NoOpCookieValueManager(tenantExtractor);
        val context = CookieUtils.buildCookieGenerationContext(new CookieProperties()
            .setName("cas")
            .setPath("/cas")
            .setMaxAge(maxAge)
            .setDomain("example.org")
            .setSecure(true));
        val gen = CookieUtils.buildCookieRetrievingGenerator(cookieValueManager, context);
        val cookie = gen.addCookie(request, response, "some-value");
        assertEquals(cookie.getMaxAge(), CookieUtils.getCookieMaxAge(maxAge));
    }
This is {@link CookieRetrievingCookieGeneratorTests}.

@author Misagh Moayyed
@since 6.0.0
core/cas-server-core-cookie/src/test/java/org/apereo/cas/web/support/CookieRetrievingCookieGeneratorTests.java