@Test
    public void shouldBeAbleToUseAnIdpMetadataResourceWithTheDefaultMetadataResolver() {
        var configuration = new SAML2Configuration();
        configuration.setKeystorePath("target/keystore.jks");
        configuration.setKeystorePassword("pac4j");
        configuration.setPrivateKeyPassword("pac4j");

        configuration.setIdentityProviderMetadataResource(new ClassPathResource("idp-metadata.xml"));
        configuration.init();

        var idpMetadataResolver = configuration.getIdentityProviderMetadataResolver();
        idpMetadataResolver.resolve();

        var result = idpMetadataResolver.getMetadata();
        assertNotNull(result);
    }
This is {@link SAML2ConfigurationTests}.

@author Misagh Moayyed
pac4j-saml/src/test/java/org/pac4j/saml/config/SAML2ConfigurationTests.java