@Test
    void verifyOperation() throws Throwable {
        val context = MockRequestContext.create(applicationContext);
        val attributes = CollectionUtils.<String, List<Object>>wrap("membership", List.of("faculty", "staff", "student"));
        WebUtils.putAuthentication(CoreAuthenticationTestUtils.getAuthentication("casuser", attributes), context);
        val event = createGoogleAnalyticsCookieAction.execute(context);
        assertNull(event);
        val cookie = context.getHttpServletResponse().getCookie(casProperties.getGoogleAnalytics().getCookie().getName());
        assertNotNull(cookie);
        assertEquals("faculty,staff", cookie.getValue());
    }
This is {@link CreateGoogleAnalyticsCookieActionTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-google-analytics/src/test/java/org/apereo/cas/web/flow/CreateGoogleAnalyticsCookieActionTests.java