import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.opendaylight.yangtools.util.xml.UntrustedXML;
-import org.opentest4j.AssertionFailedError;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;
try {
doc = UntrustedXML.newDocumentBuilder().parse(xmlContent);
} catch (SAXException | IOException e) {
- throw new AssertionFailedError(null, e);
+ throw new AssertionError(e);
}
doc.getDocumentElement().normalize();
return doc;
try {
transformer = TF.newTransformer();
} catch (TransformerConfigurationException e) {
- throw new AssertionFailedError(null, e);
+ throw new AssertionError(e);
}
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
try {
transformer.transform(new DOMSource(xml), result);
} catch (TransformerException e) {
- throw new AssertionFailedError(null, e);
+ throw new AssertionError(e);
}
return result.getWriter().toString();
}