@Test
void testSingleMetadataFile() throws CertificateException, URISyntaxException, FileNotFoundException
{

  URL metadataDirURL = this.getClass().getResource("/singleMetadataFile");
  Mockito.when(mockConfigHolder.getProviderConfigDir()).thenReturn(new File(metadataDirURL.toURI()));
  URL sigCertURL = this.getClass().getResource("/singleMetadataFile/generated_metadata.crt");
  Mockito.when(mockConfigHolder.getMetadataSignatureCert())
         .thenReturn(readCertificate(new File(sigCertURL.toURI())));
  ServiceProviderConfig config = new ServiceProviderConfig(mockConfigHolder);
  Assertions.assertNotNull(config.getProviderByEntityID("http://localhost:8080/eIDASDemoApplication/Metadata"),
                           "Metadata expected");
}