@Test
    void verifyCacheKeyNoEntityIdCriteria() {
        val criteriaSet = new CriteriaSet();
        criteriaSet.add(new EntityRoleCriterion(SPSSODescriptor.DEFAULT_ELEMENT_NAME));

        val service = new SamlRegisteredService();
        service.setName("Example");
        service.setId(1000);
        service.setServiceId(".+");
        service.setMetadataLocation("https://mdq.something.net/entities/{0}");

        val results = new SamlRegisteredServiceCacheKey(service, criteriaSet);
        assertNotNull(results.getId());
        assertEquals(service.getServiceId(), results.getCacheKey());
    }
This is {@link SamlRegisteredServiceCacheKeyTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-saml-idp-metadata/src/test/java/org/apereo/cas/support/saml/services/idp/metadata/cache/SamlRegisteredServiceCacheKeyTests.java