static String toJson(ViewHistoryEntry entry) {
    return JsonUtil.generate(gen -> toJson(entry, gen), false);
  }
@Test
  public void testViewHistoryEntryToJson() {
    String json = "{\"timestamp-ms\":123,\"version-id\":1}";
    ViewHistoryEntry viewHistoryEntry =
        ImmutableViewHistoryEntry.builder().versionId(1).timestampMillis(123).build();
    assertThat(ViewHistoryEntryParser.toJson(viewHistoryEntry))
        .as("Should be able to serialize view history entry")
        .isEqualTo(json);
  }