QName confidentiality_transport = new QName(namespace, "confidentiality.transport");
assertTrue(intentTable.get(confidentiality_transport) instanceof QualifiedIntent);
QualifiedIntent qualifiedIntent = (QualifiedIntent)intentTable.get(new QName(namespace, "confidentiality.transport"));
assertNull(qualifiedIntent.getQualifiableIntent().getDescription());
PolicySet secureReliablePolicySet = policySetTable.get(secureReliablePolicy);
PolicySet secureMessagingPolicySet = policySetTable.get(secureMessagingPolicies);
PolicySet securityPolicySet = policySetTable.get(securityPolicy);
assertEquals(secureReliablePolicySet.getProvidedIntents().get(1).getName(), integrity);
assertNull(secureReliablePolicySet.getProvidedIntents().get(1).getDescription());
assertTrue(secureMessagingPolicySet.isUnresolved());
assertEquals(securityPolicySet.getMappedPolicies().size(), 5);
//testing to ensure that inclusion of referred policy sets has not happened
PolicySet basicAuthMsgProtSecurityPolicySet = policySetTable.get(basicAuthMsgProtSecurity);
assertTrue(basicAuthMsgProtSecurityPolicySet.getPolicies().isEmpty());
assertTrue(basicAuthMsgProtSecurityPolicySet.getMappedPolicies().isEmpty());
IntentAttachPointType wsBindingType = bindingTypesTable.get(wsBinding);
assertNull(wsBindingType.getAlwaysProvidedIntents().get(0).getDescription());
assertNull(wsBindingType.getMayProvideIntents().get(0).getDescription());
IntentAttachPointType javaImplType = implTypesTable.get(javaImpl);
assertNull(javaImplType.getAlwaysProvidedIntents().get(0).getDescription());
assertNull(javaImplType.getMayProvideIntents().get(0).getDescription());
for ( Intent intent : intentTable.values() ) {
staxProcessor.resolve(intent, resolver);
}
for ( PolicySet policySet : policySetTable.values() ) {
staxProcessor.resolve(policySet, resolver);
}
for ( IntentAttachPointType bindingType : bindingTypesTable.values() ) {
staxProcessor.resolve(bindingType, resolver);
}
for ( IntentAttachPointType implType : implTypesTable.values() ) {
staxProcessor.resolve(implType, resolver);
}
//testing if policy intents have been linked have property been linked up
assertNotNull(profileIntent.getRequiredIntents().get(0).getDescription());
assertNotNull(qualifiedIntent.getQualifiableIntent().getDescription());
assertEquals(secureReliablePolicySet.getProvidedIntents().get(1).getName(), integrity);
assertNotNull(secureReliablePolicySet.getProvidedIntents().get(1).getDescription());
//testing if policysets have been properly linked up with intents
assertFalse(secureMessagingPolicySet.isUnresolved());
assertNotNull(secureMessagingPolicySet.getMappedPolicies().get(intentTable.get(confidentiality)));
assertNotNull(secureMessagingPolicySet.getMappedPolicies().get(intentTable.get(confidentiality_transport)));
//testing if intent maps have been properly mapped to policies
assertFalse(securityPolicySet.isUnresolved());
assertNotNull(securityPolicySet.getMappedPolicies().get(intentTable.get(confidentiality)));
assertNotNull(securityPolicySet.getMappedPolicies().get(intentTable.get(confidentiality_message)));
//testing for inclusion of referred policysets
assertFalse(basicAuthMsgProtSecurityPolicySet.getPolicies().isEmpty());
assertFalse(basicAuthMsgProtSecurityPolicySet.getMappedPolicies().isEmpty());
assertNotNull(basicAuthMsgProtSecurityPolicySet.getMappedPolicies().get(intentTable.get(confidentiality_transport)));
assertNotNull(wsBindingType.getAlwaysProvidedIntents().get(0).getDescription());
assertNotNull(wsBindingType.getMayProvideIntents().get(0).getDescription());
assertNotNull(javaImplType.getAlwaysProvidedIntents().get(0).getDescription());