public boolean compare(String baselinecontent, String testresult) throws Exception { StringReader baserdr = new StringReader(baselinecontent); StringReader resultrdr = new StringReader(testresult); // Diff the two files Diff diff = new Diff("Testing " + getTitle()); boolean pass = !diff.doDiff(baserdr, resultrdr); baserdr.close(); resultrdr.close(); return pass; }