@Test
    void verifyInvalidExpiredMetadataResourceIsOkay() throws Throwable {
        val resolver = new InMemoryResourceMetadataResolver(new ClassPathResource("metadata/metadata-expired.xml"), configBean);
        resolver.setRequireValidMetadata(false);
        resolver.setId(UUID.randomUUID().toString());
        resolver.initialize();

        val criteriaSet = new CriteriaSet();
        criteriaSet.add(new EntityIdCriterion("urn:app.e2ma.net"));
        criteriaSet.add(new EntityRoleCriterion(SPSSODescriptor.DEFAULT_ELEMENT_NAME));
        val resolved = resolver.resolve(criteriaSet);
        assertFalse(Iterables.isEmpty(resolved));
    }
This is {@link InMemoryResourceMetadataResolverTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-saml/src/test/java/org/apereo/cas/support/saml/InMemoryResourceMetadataResolverTests.java