final Diff diff = new Diff(expected.trim(), result.trim());
final Diff myDiff = new DetailedDiff(diff);
final AtomicInteger differenceNumber = new AtomicInteger(0); // just to get an int wrapper for the test
myDiff.overrideDifferenceListener(new IgnoreTextAndAttributeValuesDifferenceListener() {
@Override
public int differenceFound(final Difference difference) {
if (!difference.isRecoverable()) {
differenceNumber.incrementAndGet();
System.err.println(">>> " + difference.toString());