@Override
    public final MetadataResolver resolve(final boolean force) {
        if (force) {
            internalLoad();
        }
        return load();
    }
@Test
    public void resolveMetadataFromByteArray() throws Exception {
        var configuration = new SAML2Configuration();
        configuration.setIdentityProviderMetadataResource(
                new ByteArrayResource(new ClassPathResource("idp-metadata.xml").getInputStream().readAllBytes()));
        metadataResolver = new SAML2IdentityProviderMetadataResolver(configuration);

        var resolver = metadataResolver.resolve();
        assertNotNull(resolver);

        assertFalse(metadataResolver.hasChanged());
        assertNotNull(metadataResolver.load());
    }