public void testElementConstructor() throws Exception { final SamlCredential samlPrincipal = new SamlCredential(assertionElement); final InputSource actual = new InputSource(new StringReader(samlPrincipal.getAssertionAsString())); XMLAssert.assertXMLEqual(expectedAssertion, actual); }
public void testEqualsContract() throws Exception { final SamlCredential samlPrincipal1 = new SamlCredential(assertionElement); final SamlCredential samlPrincipal2 = new SamlCredential(assertionElement); assertEquals(samlPrincipal1, samlPrincipal2); assertEquals(samlPrincipal1.hashCode(), samlPrincipal2.hashCode()); }