// Rename the file in the subdirectory.
hdfs.rename(sub2file1, sub2file2);
// Query the diff report and make sure it looks as expected.
SnapshotDiffReport diffReport = hdfs.getSnapshotDiffReport(sub1, sub1snap1,
"");
LOG.info("DiffList is \n\"" + diffReport.toString() + "\"");
List<DiffReportEntry> entries = diffReport.getDiffList();
assertTrue(existsInDiffReport(entries, DiffType.MODIFY, sub2.getName()));
assertTrue(existsInDiffReport(entries, DiffType.CREATE, sub2.getName()
+ "/" + sub2file2.getName()));
assertTrue(existsInDiffReport(entries, DiffType.DELETE, sub2.getName()
+ "/" + sub2file1.getName()));