String config = "config/test-metadata-config-";
public void testMetadata() throws Exception {
Object object = this.unmarshall(config + "1.xml");
assertNotNull("IDP is not null", object);
IDPType idp = (IDPType) object;
assertEquals("somefqn", idp.getRoleGenerator());
TrustType trust = idp.getTrust();
assertNotNull("Trust is not null", trust);
String domains = trust.getDomains();
assertTrue("localhost trusted", domains.indexOf("localhost") > -1);
assertTrue("jboss.com trusted", domains.indexOf("jboss.com") > -1);
MetadataProviderType metaDataProvider = idp.getMetaDataProvider();
assertNotNull("MetadataProvider is not null", metaDataProvider);
assertEquals("org.jboss.test.somefqn", metaDataProvider.getClassName());
List<KeyValueType> keyValues = metaDataProvider.getOption();
assertTrue(1 == keyValues.size());