public static MetadataUpdate fromJson(String json) {
    return JsonUtil.parse(json, MetadataUpdateParser::fromJson);
  }
@Test
  public void testAddViewVersionFromJson() {
    String action = MetadataUpdateParser.ADD_VIEW_VERSION;
    long timestamp = 123456789;
    ViewVersion viewVersion =
        ImmutableViewVersion.builder()
            .versionId(23)
            .timestampMillis(timestamp)
            .schemaId(4)
            .putSummary("user", "some-user")
            .defaultNamespace(Namespace.of("ns"))
            .build();
    String json =
        String.format(
            "{\"action\":\"%s\",\"view-version\":{\"version-id\":23,\"timestamp-ms\":123456789,\"schema-id\":4,\"summary\":{\"user\":\"some-user\"},\"default-namespace\":[\"ns\"],\"representations\":[]}}",
            action);
    MetadataUpdate expected = new MetadataUpdate.AddViewVersion(viewVersion);
    assertEquals(action, expected, MetadataUpdateParser.fromJson(json));
  }