@Test
void whenGetMetadataCalledExpectMetadataByteArray()
{

  Security.addProvider(new BouncyCastleProvider());
  Mockito.when(buildProperties.getVersion()).thenReturn("2.0");
  byte[] metadata = metadataService.getMetadata();
  String metadataAsString = new String(metadata);
  Assertions.assertTrue(ArrayUtils.isNotEmpty(metadata));
  Assertions.assertTrue(metadataAsString.contains("CONTACT_PERSON_COMPANY"));
  Assertions.assertTrue(metadataAsString.contains("CONTACT_PERSON_EMAIL"));
  Assertions.assertTrue(metadataAsString.contains("CONTACT_PERSON_GIVENNAME"));
  Assertions.assertTrue(metadataAsString.contains("CONTACT_PERSON_TEL"));
  Assertions.assertTrue(metadataAsString.contains("http://localhost:8080/eidas-middleware/Metadata"));
  Assertions.assertTrue(metadataAsString.contains("ORGANIZATION_DISPLAY_NAME"));
  Assertions.assertTrue(metadataAsString.contains("http://localhost:8080/eidas-middleware/RequestReceiver"));
  Assertions.assertTrue(new String(metadata).contains("2.0"));
}