SAML2IdentityProviderMetadataResolver implements SAML2MetadataResolver { @Override public String getMetadata() { if (getEntityDescriptorElement() != null) { return Configuration.serializeSamlObject(getEntityDescriptorElement()).toString(); } throw new TechnicalException("Metadata cannot be retrieved because entity descriptor is null"); } SAML2IdentityProviderMetadataResolver(final SAML2Configuration configuration);  SAML2IdentityProviderMetadataResolver(final Resource idpMetadataResource, @Nullable final String idpEntityId); @Override final MetadataResolver resolve(); @Override String getEntityId(); @Override String getMetadata(); @Override final XMLObject getEntityDescriptorElement();  }
@Test public void resolveMetadataDocumentAsString() { final String metadata = metadataResolver.getMetadata(); assertNotNull(metadata); }