@Test
    void verifyRequiredRegex() {
        val request = RegisteredServiceAccessStrategyRequest.builder()
            .principalId("casuser")
            .attributes(CollectionUtils.wrap("cn", List.of("***")))
            .applicationContext(applicationContext)
            .build();
        val criteria = new AttributeBasedRegisteredServiceAccessStrategyActivationCriteria()
            .setOperator(LogicalOperatorTypes.OR)
            .setAllowIfInactive(true)
            .setRequiredAttributes(Map.of("common-name", List.of("n@m3"), "cn", List.of("***")));
        assertTrue(criteria.shouldActivate(request));
    }
This is {@link AttributeBasedRegisteredServiceAccessStrategyActivationCriteriaTests}.

@author Misagh Moayyed
@since 7.0.0
core/cas-server-core-services-api/src/test/java/org/apereo/cas/services/AttributeBasedRegisteredServiceAccessStrategyActivationCriteriaTests.java