SamlServiceProviderConfigurator { public ExtendedMetadataDelegate getExtendedMetadataDelegate(SamlServiceProvider provider) throws MetadataProviderException { ExtendedMetadataDelegate metadata; switch (provider.getConfig().getType()) { case DATA: { metadata = configureXMLMetadata(provider); break; } case URL: { metadata = configureURLMetadata(provider); break; } default: { throw new MetadataProviderException("Invalid metadata type for alias[" + provider.getEntityId() + "]:" + provider.getConfig().getMetaDataLocation()); } } return metadata; } SamlServiceProviderConfigurator(); List<SamlServiceProviderHolder> getSamlServiceProviders(); List<SamlServiceProviderHolder> getSamlServiceProvidersForZone(IdentityZone zone); void validateSamlServiceProvider(SamlServiceProvider provider); ExtendedMetadataDelegate getExtendedMetadataDelegate(SamlServiceProvider provider); SamlServiceProviderProvisioning getProviderProvisioning(); void setProviderProvisioning(SamlServiceProviderProvisioning providerProvisioning); BasicParserPool getParserPool(); void setParserPool(BasicParserPool parserPool); void setSupportedNameIDs(Set<String> supportedNameIDs); void setFixedHttpMetaDataProvider(FixedHttpMetaDataProvider fixedHttpMetaDataProvider);  }
@Test public void testGetExtendedMetadataDelegateUrl() throws MetadataProviderException { slowHttpServer.run(); expectedEx.expect(MetadataProviderException.class); expectedEx.expectMessage("Unavailable Metadata Provider"); SamlServiceProvider provider = mockSamlServiceProviderMetadatauriForZone(slowHttpServer.getUrl()); conf.getExtendedMetadataDelegate(provider); }