MetadataManager extends ChainingMetadataProvider implements ExtendedMetadataProvider, InitializingBean, DisposableBean { public ExtendedMetadata getExtendedMetadata(String entityID) throws MetadataProviderException { try { lock.readLock().lock(); for (MetadataProvider provider : getProviders()) { ExtendedMetadata extendedMetadata = getExtendedMetadata(entityID, provider); if (extendedMetadata != null) { return extendedMetadata; } } return getDefaultExtendedMetadata().clone(); } finally { lock.readLock().unlock(); } } MetadataManager(List<MetadataProvider> providers); final void afterPropertiesSet(); void destroy(); @Override void setProviders(List<MetadataProvider> newProviders); void refreshMetadata(); @Override void addMetadataProvider(MetadataProvider newProvider); @Override void removeMetadataProvider(MetadataProvider provider); List<MetadataProvider> getProviders(); List<ExtendedMetadataDelegate> getAvailableProviders(); Set<String> getIDPEntityNames(); Set<String> getSPEntityNames(); boolean isIDPValid(String idpID); boolean isSPValid(String spID); String getHostedSPName(); void setHostedSPName(String hostedSPName); String getDefaultIDP(); void setDefaultIDP(String defaultIDP); ExtendedMetadata getExtendedMetadata(String entityID); EntityDescriptor getEntityDescriptor(byte[] hash); String getEntityIdForAlias(String entityAlias); ExtendedMetadata getDefaultExtendedMetadata(); void setDefaultExtendedMetadata(ExtendedMetadata defaultExtendedMetadata); boolean isRefreshRequired(); void setRefreshRequired(boolean refreshRequired); void setRefreshCheckInterval(long refreshCheckInterval); @Autowired void setKeyManager(KeyManager keyManager); @Autowired(required = false) void setTLSConfigurer(TLSProtocolConfigurer configurer);  }
@Test public void testNullEntityId() throws Exception { manager.getExtendedMetadata(null); }