// by DOM, as expected, but not generated by the method under test,
// otherwise the comparison would fail.
actual.getDocumentElement().setAttribute(Constants.INSTANCE_PREFIX,
Constants.INSTANCE_NS);
Diff diff = new Diff(expected, actual);
assertTrue(message + ", " + diff.toString(), diff.similar());
}
/**
* Print a document to a writer for debugging purposes.
* @param document The document to print.