@Test
    void verifyResolverWithDirectory() throws Throwable {
        val service = new SamlRegisteredService();
        val file = new FileSystemResource("src/test/resources/md-dir").getFile().getCanonicalPath();
        service.setMetadataLocation(file);

        val resolvers = metadataResolver.resolve(service);
        assertFalse(resolvers.isEmpty());
        val directoryResolver = resolvers.iterator().next();

        val criteriaSet = new CriteriaSet();
        criteriaSet.add(new EntityIdCriterion("sp1:example"));
        criteriaSet.add(new EntityRoleCriterion(SPSSODescriptor.DEFAULT_ELEMENT_NAME));
        assertEquals(1, Iterables.size(directoryResolver.resolve(criteriaSet)));
    }
This is {@link FileSystemResourceMetadataResolverTests}.

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