private static SnapshotDiffReport getSnapshotDiffReport(
      final FileSystem fs,
      final Path snapshotDir,
      final String fromSnapshot,
      final String toSnapshot) throws IOException {
    try {
      return (SnapshotDiffReport) getSnapshotDiffReportMethod(fs).invoke(
          fs, snapshotDir, fromSnapshot, toSnapshot);
    } catch (InvocationTargetException e) {
      throw new IOException(e.getCause());
    } catch (NoSuchMethodException|IllegalAccessException e) {
      throw new IllegalArgumentException(
          "Failed to invoke getSnapshotDiffReport.", e);
    }
  }
@Test
  public void testSync5() throws Exception {
    initData5(source);
    initData5(target);
    enableAndCreateFirstSnapshot();

    // make changes under source
    changeData5(source);
    dfs.createSnapshot(source, "s2");

    SnapshotDiffReport report = dfs.getSnapshotDiffReport(source, "s1", "s2");
    System.out.println(report);

    syncAndVerify();
  }