@Test
    void verifyMappedRegexAttributeFilter() {
        getRegisteredServiceTypes().forEach(type -> {
            val registeredService = buildRegisteredServiceInstance(RandomUtils.nextInt(), type)
                .setId(RegisteredServiceDefinition.INITIAL_IDENTIFIER_VALUE);

            val releasePolicy = new ReturnAllowedAttributeReleasePolicy();
            val filter = new RegisteredServiceMappedRegexAttributeFilter();
            filter.setCompleteMatch(true);
            filter.setPatterns(CollectionUtils.wrap("one", "two"));
            releasePolicy.setAttributeFilter(filter);

            registeredService.setAttributeReleasePolicy(releasePolicy);
            serviceRegistry.save(registeredService);
            serviceRegistry.load();
        });
    }
Abstracted service registry tests for all implementations.

@author Timur Duehr
@since 5.3.0
core/cas-server-core-services/src/test/java/org/apereo/cas/services/AbstractServiceRegistryTests.java