code: public static void assertXMLEqual(String msg, Diff diff,
                                        boolean assertion) {       
          if (assertion != diff.similar()) {
              fail(getFailMessage(msg, diff));
          }
      }
docs: Assert that the result of an XML comparison is or is not similar.
  @param msg additional message to display if assertion fails
  @param diff the result of an XML comparison
  @param assertion true if asserting that result is similar