@Test
    void verifyResolver() throws Throwable {
        val res = new ClassPathResource("sp-metadata.xml");
        val md = new SamlMetadataDocument();
        md.setName("SP");
        md.setValue(IOUtils.toString(res.getInputStream(), StandardCharsets.UTF_8));
        resolver.saveOrUpdate(md);

        val service = new SamlRegisteredService();
        service.setName("SAML Service");
        service.setServiceId("https://carmenwiki.osu.edu/shibboleth");
        service.setDescription("Testing");
        service.setMetadataLocation("mongodb://");
        assertTrue(resolver.supports(service));
        assertTrue(resolver.isAvailable(service));
        val resolvers = resolver.resolve(service);
        assertEquals(1, resolvers.size());
    }
This is {@link MongoDbSamlRegisteredServiceMetadataResolverTests}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-saml-idp-metadata-mongo/src/test/java/org/apereo/cas/support/saml/metadata/resolver/MongoDbSamlRegisteredServiceMetadataResolverTests.java