@Test
public void test02() throws Exception {
Object object = this.unmarshall(config + "2.xml");
assertNotNull("IDP is not null", object);
IDPType idp = (IDPType) object;
assertEquals("somefqn", idp.getRoleGenerator());
assertTrue(idp.isEncrypt());
assertEquals(CanonicalizationMethod.EXCLUSIVE, idp.getCanonicalizationMethod());
KeyProviderType kp = idp.getKeyProvider();
assertNotNull("KeyProvider is not null", kp);
assertEquals("SomeClass", "SomeClass", kp.getClassName());
List<AuthPropertyType> authProps = kp.getAuth();
AuthPropertyType authProp = authProps.get(0);
assertEquals("SomeKey", "SomeKey", authProp.getKey());
assertEquals("SomeValue", "SomeValue", authProp.getValue());
authProp = authProps.get(1);
assertEquals("DBURL", "DBURL", authProp.getKey());
assertEquals("SomeDBURL", "SomeDBURL", authProp.getValue());
List<KeyValueType> validatingAliases = kp.getValidatingAlias();
assertEquals("Validating Alias length is 2", 2, validatingAliases.size());
KeyValueType kv = validatingAliases.get(0);
assertEquals("localhost", kv.getKey());
assertEquals("localhostalias", kv.getValue());
kv = validatingAliases.get(1);
assertEquals("jboss.com", kv.getKey());
assertEquals("jbossalias", kv.getValue());
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);
}