@Test
    void verifyRemoveAllCookiesByName() {
        val request = new MockHttpServletRequest();
        var response = new MockHttpServletResponse();
        val cookieValueManager = new NoOpCookieValueManager(tenantExtractor);

        val gen1 = CookieUtils.buildCookieRetrievingGenerator(cookieValueManager, getCookieGenerationContext());
        val cookie1 = gen1.addCookie(request, response, "some-value");

        val gen2 = CookieUtils.buildCookieRetrievingGenerator(cookieValueManager, getCookieGenerationContext("/cas"));
        val cookie2 = gen2.addCookie(request, response, "some-value");

        val gen3 = CookieUtils.buildCookieRetrievingGenerator(cookieValueManager, getCookieGenerationContext("/cas/"));
        val cookie3 = gen3.addCookie(request, response, "some-value");

        request.setCookies(cookie1, cookie2, cookie3);
        response = new MockHttpServletResponse();
        gen1.removeAll(request, response);
        assertEquals(3, response.getCookies().length);
        assertTrue(Arrays.stream(response.getCookies()).allMatch(cookie -> cookie.getMaxAge() == 0));
    }
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