@Test
        void verifyActionAcceptedGlobal() throws Throwable {
            val properties = new AcceptableUsagePolicyProperties();
            properties.getInMemory().setScope(InMemoryAcceptableUsagePolicyProperties.Scope.GLOBAL);
            val context = MockRequestContext.create();
            val repo = getRepositoryInstance(properties);
            val authentication = CoreAuthenticationTestUtils.getAuthentication();
            authentication.getPrincipal().getAttributes().put(
                properties.getCore().getAupAttributeName(),
                List.of("true"));
            WebUtils.putAuthentication(authentication, context);
            WebUtils.putTicketGrantingTicketInScopes(context, "TGT-12345");
            assertTrue(repo.verify(context).isAccepted());
        }
This is {@link DefaultAcceptableUsagePolicyRepositoryTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-aup-webflow/src/test/java/org/apereo/cas/aup/DefaultAcceptableUsagePolicyRepositoryTests.java