@Test
void testReadPoseidasXmlConfiguration()
{

  URL poseidasXmlUrl = getPoseidasXmlFilePath(CONFIG_DIR_SUCCESS);
  PoseidasCoreConfiguration poseidasCoreConfiguration = getPoseidasCoreConfiguration(poseidasXmlUrl);
  PoseidasCoreConfigForm poseidasCoreConfigForm = new PoseidasCoreConfigForm();
  poseidasCoreConfigForm.loadConfiguration(new File(poseidasXmlUrl.getFile()));
  final String serverUrl = "https://myhost:8443/eidas-middleware";
  EQUAL_NULL_CHECK.accept(serverUrl, poseidasCoreConfiguration.getServerUrl());
  EQUAL_NULL_CHECK.accept(poseidasCoreConfiguration.getServerUrl().trim(),
                          poseidasCoreConfigForm.getCoreConfig().getServerUrl());
  final int maxPendingRequests = 500;
  Assertions.assertEquals(maxPendingRequests, poseidasCoreConfiguration.getSessionMaxPendingRequests());
  checkTimerConfigurationForConfigDir1(poseidasCoreConfiguration, poseidasCoreConfigForm);
  Assertions.assertTrue(poseidasCoreConfigForm.getServiceProviders().size() == 1);
  Assertions.assertNotNull(poseidasCoreConfigForm.getServiceProviders().get(0));
  Assertions.assertEquals(1, poseidasCoreConfiguration.getServiceProvider().size());
  checkThatServiceProviderTypesAreEqualForConfigDir1(poseidasCoreConfiguration.getServiceProvider().get(0),
                                                     poseidasCoreConfigForm.getServiceProviders().get(0));
}