@Test
    void verifyOperationWithService() throws Throwable {
        val criteria = new CriteriaSet(
            new SamlIdPSamlRegisteredServiceCriterion(getSamlRegisteredServiceFor(UUID.randomUUID().toString())),
            new EntityIdCriterion(casProperties.getAuthn().getSamlIdp().getCore().getEntityId()));

        var locator = mock(SamlIdPMetadataLocator.class);
        when(locator.shouldGenerateMetadataFor(any())).thenReturn(true);
        when(locator.exists(any())).thenReturn(false);
        when(locator.resolveMetadata(any())).thenReturn(new ByteArrayResource(ArrayUtils.EMPTY_BYTE_ARRAY));
        val resolver = new SamlIdPMetadataResolver(locator, mock(SamlIdPMetadataGenerator.class), openSamlConfigBean, casProperties);
        val result1 = resolver.resolve(criteria);
        assertTrue(Iterables.isEmpty(result1));
    }
This is {@link SamlIdPMetadataResolverTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/idp/metadata/locator/SamlIdPMetadataResolverTests.java