@Test
void validateConfigThrowsExceptionWhenDuplicatedEntityPresent() throws Exception
{

  InputStream resourceAsStream = CoreConfigurationDtoTest.class.getResourceAsStream("/POSeIDAS-duplicated-SP.xml");
  byte[] bytes = ByteStreams.toByteArray(resourceAsStream);
  Reader reader = CharSource.wrap(new String(bytes)).openStream();
  Assertions.assertThrows(InvalidConfigurationException.class, () -> CoreConfigurationDto.readFrom(reader));
}