}
public void testNullInitCause() {
XPathException ex = new XPathException(null, null);
assertNull(ex.getCause());
try {
ex.initCause(new Exception());
fail("Reinitialized cause over null");
}
catch (IllegalStateException success) {
assertNotNull(success.getMessage());
}
try {
ex.initCause(null);
fail("Reinitialized cause over null");
}
catch (IllegalStateException success) {
assertNotNull(success.getMessage());
}