@Test
    void checkAuthzPrincipalWithAttrValueCaseInsensitiveComparison() throws Throwable {
        val authz = new DefaultRegisteredServiceAccessStrategy();

        val reqs = getRequiredAttributes();
        authz.setRequiredAttributes(reqs);

        val pAttrs = getPrincipalAttributes();
        authz.setCaseInsensitive(true);

        pAttrs.put(CN, CAS);
        pAttrs.put(GIVEN_NAME, "kaz");
        assertTrue(authz.authorizeRequest(RegisteredServiceAccessStrategyRequest.builder().applicationContext(applicationContext)
            .principalId(TEST).attributes(pAttrs).build()));
    }
It is important that the non-matching attribute is not the first one, due to the
use of anyMatch and allMatch in the access strategy.
core/cas-server-core-services/src/test/java/org/apereo/cas/services/DefaultRegisteredServiceAccessStrategyTests.java