public static String toJsonString(final Token<? extends TokenIdentifier> token
      ) throws IOException {
    return toJsonString(Token.class, toJsonMap(token));
  }
@Test
  public void testSnapshotDiffReportListing() throws IOException {
    List<DiffReportListingEntry> mlist = new ChunkedArrayList<>();
    List<DiffReportListingEntry> clist = new ChunkedArrayList<>();
    List<DiffReportListingEntry> dlist = new ChunkedArrayList<>();
    clist.add(new DiffReportListingEntry(
        1L, 2L, DFSUtilClient.string2Bytes("dir1/file2"), false, null));
    clist.add(new DiffReportListingEntry(
        1L, 3L, DFSUtilClient.string2Bytes("dir1/file3"), false, null));
    dlist.add(new DiffReportListingEntry(
        1L, 4L, DFSUtilClient.string2Bytes("dir1/file4"), false, null));
    dlist.add(new DiffReportListingEntry(
        1L, 5L,
        DFSUtilClient.string2Bytes("dir1/file5"),
        true,
        DFSUtilClient.string2Bytes("dir1/file6")));

    SnapshotDiffReportListing report =
        new SnapshotDiffReportListing(
            DFSUtilClient.string2Bytes("dir1/file2"), mlist, clist, dlist, 3, true);
    String jsonString = JsonUtil.toJsonString(report);
    Map<?, ?> json = READER.readValue(jsonString);
    SnapshotDiffReportListing parsed =
        JsonUtilClient.toSnapshotDiffReportListing(json);

    assertEquals(report, parsed);
  }