assertEquals("urn:oasis:names:tc:SAML:2.0:status:Success", status.getStatusCode().getValue().toString());
List<RTChoiceType> assertionList = response.getAssertions();
assertEquals(2, assertionList.size());
AssertionType assertion1 = assertionList.get(0).getAssertion();
assertEquals("ID_0be488d8-7089-4892-8aeb-83594c800706", assertion1.getID());
assertEquals(XMLTimeUtil.parse("2009-05-26T14:06:26.362-05:00"), assertion1.getIssueInstant());
assertEquals("2.0", assertion1.getVersion());
assertEquals("testIssuer", assertion1.getIssuer().getValue());
Iterator<StatementAbstractType> iterator = assertion1.getStatements().iterator();
AuthnStatementType authnStatement = (AuthnStatementType) iterator.next();
assertEquals(XMLTimeUtil.parse("2009-05-26T14:06:26.359-05:00"), authnStatement.getAuthnInstant());
AuthnContextType authnContext = authnStatement.getAuthnContext();
AuthnContextDeclRefType refType = (AuthnContextDeclRefType) authnContext.getURIType().iterator().next();
assertEquals("urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport", refType.getValue().toASCIIString());
/*
* JAXBElement<?> authnContextDeclRefJaxb = (JAXBElement<?>) authnStatement.getAuthnContext().getContent().get(0);
* assertEquals( "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport", authnContextDeclRefJaxb.getValue()
* );
*/
AssertionType assertion2 = assertionList.get(1).getAssertion();
assertEquals("ID_976d8310-658a-450d-be39-f33c73c8afa6", assertion2.getID());
assertEquals(XMLTimeUtil.parse("2009-05-26T14:06:26.363-05:00"), assertion2.getIssueInstant());
assertEquals("2.0", assertion2.getVersion());
assertEquals("testIssuer", assertion2.getIssuer().getValue());
authnStatement = (AuthnStatementType) assertion2.getStatements().iterator().next();
assertEquals(XMLTimeUtil.parse("2009-05-26T14:06:26.359-05:00"), authnStatement.getAuthnInstant());
SubjectLocalityType subjectLocality = authnStatement.getSubjectLocality();
assertNotNull(subjectLocality);
assertEquals("127.0.0.1", subjectLocality.getAddress());
authnContext = authnStatement.getAuthnContext();