@Test
    void verifyResolverResolves() throws Throwable {
        val props = new SamlIdPProperties();
        val dir = new FileSystemResource(FileUtils.getTempDirectory());
        props.getMetadata().getFileSystem().setLocation(dir.getFile().getCanonicalPath());
        FileUtils.copyFile(new ClassPathResource("saml-sp-metadata.json").getFile(),
            new File(FileUtils.getTempDirectory(), "saml-sp-metadata.json"));
        val service = new SamlRegisteredService();
        val resolver = new JsonResourceMetadataResolver(props, openSamlConfigBean);
        service.setName("Example");
        service.setId(1000);
        service.setServiceId("https://example.org/saml");
        service.setMetadataLocation("json://");
        assertTrue(resolver.isAvailable(service));
        assertTrue(resolver.supports(service));
        val results = resolver.resolve(service);
        assertFalse(results.isEmpty());
        val metadataResolver = results.iterator().next();
        val resolved = metadataResolver.resolveSingle(new CriteriaSet(new EntityIdCriterion("https://example.org/saml")));
        assertNotNull(resolved);
        resolver.destroy();
    }
This is {@link JsonResourceMetadataResolverTests}.

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