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