StringReader reader = new StringReader(writer.toString());
configurator.loadConfig(reader);
ContextConfig config = configurator.getContextConfig(CONFIG_NAME);
Assert.assertNotNull(config);
AudienceUris audience = config.getAudienceUris();
Assert.assertEquals(1, audience.getAudienceItem().size());
Assert.assertTrue(config.getProtocol() instanceof FederationProtocolType);
FederationProtocolType fp = (FederationProtocolType)config.getProtocol();
Assert.assertEquals(HOME_REALM_CLASS, fp.getHomeRealm().getValue());
//Assert.assertEquals(config.getCertificateValidation(),ValidationType.CHAIN_TRUST);