@BeforeClass
 public static void setUp() {
   XMLUnit.setIgnoreComments(true);
   XMLUnit.setIgnoreAttributeOrder(true);
   XMLUnit.setIgnoreWhitespace(true);
   XMLUnit.setNormalizeWhitespace(true);
   XMLUnit.setCompareUnmatched(false);
 }
 @Before
 public void setUp() throws Exception {
   XMLUnit.setIgnoreComments(true);
   XMLUnit.setIgnoreWhitespace(true);
   XMLUnit.setIgnoreAttributeOrder(true);
   XMLUnit.setNormalizeWhitespace(true);
   XMLUnit.setNormalize(true);
 }
  @Test
  public void testAudioMD_noMD5() throws Exception {

    Fits fits = new Fits();

    // First generate the FITS output
    File input = new File("testfiles/test.wav");
    FitsOutput fitsOut = fits.examine(input);

    XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
    String actualXmlStr = serializer.outputString(fitsOut.getFitsXml());

    // Read in the expected XML file
    Scanner scan = new Scanner(new File("testfiles/output/FITS_test_wav_NO_MD5.xml"));
    String expectedXmlStr = scan.useDelimiter("\\Z").next();
    scan.close();

    // Set up XMLUnit
    XMLUnit.setIgnoreWhitespace(true);
    XMLUnit.setNormalizeWhitespace(true);

    Diff diff = new Diff(expectedXmlStr, actualXmlStr);

    // Initialize attributes or elements to ignore for difference checking
    diff.overrideDifferenceListener(
        new IgnoreNamedElementsDifferenceListener(
            "version",
            "toolversion",
            "dateModified",
            "fslastmodified",
            "lastmodified",
            "startDate",
            "startTime",
            "timestamp",
            "fitsExecutionTime",
            "executionTime",
            "filepath",
            "location"));

    DetailedDiff detailedDiff = new DetailedDiff(diff);

    // Display any Differences
    List<Difference> diffs = detailedDiff.getAllDifferences();
    if (!diff.identical()) {
      StringBuffer differenceDescription = new StringBuffer();
      differenceDescription.append(diffs.size()).append(" differences");

      System.out.println(differenceDescription.toString());
      for (Difference difference : diffs) {
        System.out.println(difference.toString());
      }
    }

    assertTrue("Differences in XML", diff.identical());
  }
 @Before
 public void setUp() {
   XMLUnit.setNormalizeWhitespace(true);
 }