@Test void testTwoMetadataFiles() throws CertificateException, URISyntaxException, FileNotFoundException { URL metadataDirURL = this.getClass().getResource("/twoMetadataFiles"); Mockito.when(mockConfigHolder.getProviderConfigDir()).thenReturn(new File(metadataDirURL.toURI())); URL sigCertURL = this.getClass().getResource("/twoMetadataFiles/sigCert.crt"); Mockito.when(mockConfigHolder.getMetadataSignatureCert()) .thenReturn(readCertificate(new File(sigCertURL.toURI()))); ServiceProviderConfig config = new ServiceProviderConfig(mockConfigHolder); Assertions.assertNotNull(config.getProviderByEntityID("https: "First metadata expected"); Assertions.assertNotNull(config.getProviderByEntityID("https: "Second metadata expected"); }
public RequestingServiceProvider getProviderByEntityID(String entityID) { return allProviders.get(entityID); }
ServiceProviderConfig { public RequestingServiceProvider getProviderByEntityID(String entityID) { return allProviders.get(entityID); } }
ServiceProviderConfig { public RequestingServiceProvider getProviderByEntityID(String entityID) { return allProviders.get(entityID); } ServiceProviderConfig(ConfigHolder configHolder); }
ServiceProviderConfig { public RequestingServiceProvider getProviderByEntityID(String entityID) { return allProviders.get(entityID); } ServiceProviderConfig(ConfigHolder configHolder); RequestingServiceProvider getProviderByEntityID(String entityID); }
ServiceProviderConfig { public RequestingServiceProvider getProviderByEntityID(String entityID) { return allProviders.get(entityID); } ServiceProviderConfig(ConfigHolder configHolder); RequestingServiceProvider getProviderByEntityID(String entityID);  }