@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://demo.mein-servicekonto.de/EidasNode/ConnectorMetadata?SP=demo_epa_20"),
                           "First metadata expected");
  Assertions.assertNotNull(config.getProviderByEntityID("https://demo.mein-servicekonto.de/EidasNode/ConnectorMetadata?SP=demo_epa"),
                           "Second metadata expected");
}