@Test
        void verifyWildcardEntityIdAndService() throws Throwable {
            val registeredService = SamlIdPTestUtils.getSamlRegisteredService();
            registeredService.setServiceId(".+testshib.org.+");

            val request = (MockHttpServletRequest) HttpRequestUtils.getHttpServletRequestFromRequestAttributes();
            Objects.requireNonNull(request).removeParameter(SamlProtocolConstants.PARAMETER_ENTITY_ID);

            val service = "https://example.org?" + SamlProtocolConstants.PARAMETER_ENTITY_ID + "=https://sp.testshib.org/shibboleth-sp";
            request.addParameter(CasProtocolConstants.PARAMETER_SERVICE, service);

            val policy = new EduPersonTargetedIdAttributeReleasePolicy();
            val releasePolicyContext = RegisteredServiceAttributeReleasePolicyContext.builder()
                .registeredService(registeredService)
                .applicationContext(applicationContext)
                .service(CoreAuthenticationTestUtils.getService("https://sp.testshib.org/shibboleth-sp"))
                .principal(CoreAuthenticationTestUtils.getPrincipal("casuser"))
                .build();
            val attributes = policy.getAttributes(releasePolicyContext);
            assertFalse(attributes.isEmpty());
        }
This is {@link SamlRegisteredServiceAttributeReleasePolicyTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/services/SamlRegisteredServiceAttributeReleasePolicyTests.java