public String getJsonString() throws IOException {
    try (OutputStream outputStream = new ByteArrayOutputStream()) {
      new ObjectMapper().writeValue(outputStream, this);
      return outputStream.toString();
    }
  }
@Test
  public void testGetJsonString() throws IOException {
    SkaffoldSyncMapTemplate ssmt = new SkaffoldSyncMapTemplate();
    ssmt.addGenerated(
        new FileEntry(
            GEN_SRC,
            AbsoluteUnixPath.get("/genDest"),
            FilePermissions.DEFAULT_FILE_PERMISSIONS,
            FileEntriesLayer.DEFAULT_MODIFICATION_TIME));
    ssmt.addDirect(
        new FileEntry(
            DIR_SRC_1,
            AbsoluteUnixPath.get("/dirDest1"),
            FilePermissions.DEFAULT_FILE_PERMISSIONS,
            FileEntriesLayer.DEFAULT_MODIFICATION_TIME));
    ssmt.addDirect(
        new FileEntry(
            DIR_SRC_2,
            AbsoluteUnixPath.get("/dirDest2"),
            FilePermissions.DEFAULT_FILE_PERMISSIONS,
            FileEntriesLayer.DEFAULT_MODIFICATION_TIME));
    Assert.assertEquals(TEST_JSON, ssmt.getJsonString());
  }