List<SAML11StatementAbstractType> statements = assertion.getStatements();
assertEquals(2, statements.size());
SAML11AttributeStatementType attrStat = (SAML11AttributeStatementType) statements.get(0);
SAML11SubjectType subject = attrStat.getSubject();
SAML11SubjectTypeChoice choice = subject.getChoice();
SAML11NameIdentifierType nameID = choice.getNameID();
assertEquals("johnq", nameID.getValue());
SAML11SubjectConfirmationType subjConf = subject.getSubjectConfirmation();
URI confirmationMethod = subjConf.getConfirmationMethod().get(0);
assertEquals("urn:oasis:names:tc:SAML:1.0:cm:artifact", confirmationMethod.toString());
List<SAML11AttributeType> attributes = attrStat.get();
assertEquals(4, attributes.size());
SAML11AttributeType attr = attributes.get(0);
assertEquals("uid", attr.getAttributeName());
assertEquals("http://jboss.org/test", attr.getAttributeNamespace().toString());
assertEquals("12345", attr.get().get(0));
attr = attributes.get(1);
assertEquals("groupMembership", attr.getAttributeName());
assertEquals("http://jboss.org/test", attr.getAttributeNamespace().toString());
assertEquals("uugid=middleware.staff,ou=Groups,dc=vt,dc=edu", attr.get().get(0));
attr = attributes.get(2);
assertEquals("eduPersonAffiliation", attr.getAttributeName());
assertEquals("http://jboss.org/test", attr.getAttributeNamespace().toString());
assertEquals("staff", attr.get().get(0));
attr = attributes.get(3);
assertEquals("accountState", attr.getAttributeName());
assertEquals("http://jboss.org/test", attr.getAttributeNamespace().toString());
assertEquals("ACTIVE", attr.get().get(0));
SAML11AuthenticationStatementType authStat = (SAML11AuthenticationStatementType) statements.get(1);
assertEquals(XMLTimeUtil.parse("2008-12-10T14:12:14.741Z"), authStat.getAuthenticationInstant());
assertEquals("urn:oasis:names:tc:SAML:1.0:am:password", authStat.getAuthenticationMethod().toString());
subject = authStat.getSubject();
choice = subject.getChoice();
nameID = choice.getNameID();
assertEquals("johnq", nameID.getValue());
subjConf = subject.getSubjectConfirmation();
confirmationMethod = subjConf.getConfirmationMethod().get(0);
assertEquals("urn:oasis:names:tc:SAML:1.0:cm:artifact", confirmationMethod.toString());