public static String toJsonString(final Token<? extends TokenIdentifier> token
      ) throws IOException {
    return toJsonString(Token.class, toJsonMap(token));
  }
@Test
  public void testHdfsFileStatusWithoutEcPolicy() throws IOException {
    final long now = Time.now();
    final String parent = "/dir";
    ErasureCodingPolicy dummyEcPolicy = new ErasureCodingPolicy("ecPolicy1",
        new ECSchema("EcSchema", 1, 1), 1024 * 2, (byte) 1);
    final HdfsFileStatus status = new HdfsFileStatus.Builder()
        .length(1001L)
        .replication(3)
        .blocksize(1L << 26)
        .mtime(now)
        .atime(now + 10)
        .perm(new FsPermission((short) 0644))
        .owner("user")
        .group("group")
        .symlink(DFSUtil.string2Bytes("bar"))
        .path(DFSUtil.string2Bytes("foo"))
        .fileId(HdfsConstants.GRANDFATHER_INODE_ID)
        .build();
    Assert.assertTrue(status.getErasureCodingPolicy() == null);

    final FileStatus fstatus = toFileStatus(status, parent);
    System.out.println("status  = " + status);
    System.out.println("fstatus = " + fstatus);
    final String json = JsonUtil.toJsonString(status, true);
    System.out.println("json    = " + json.replace(",", ",\n  "));
    final HdfsFileStatus s2 =
        JsonUtilClient.toFileStatus((Map<?, ?>) READER.readValue(json), true);
    final FileStatus fs2 = toFileStatus(s2, parent);
    System.out.println("s2      = " + s2);
    System.out.println("fs2     = " + fs2);

    Assert.assertEquals(fstatus, fs2);
  }