public static String toJson(MetadataUpdate metadataUpdate) {
    return toJson(metadataUpdate, false);
  }
@Test
  public void testSetCurrentViewVersionToJson() {
    String action = MetadataUpdateParser.SET_CURRENT_VIEW_VERSION;
    String expected = String.format("{\"action\":\"%s\",\"view-version-id\":23}", action);
    MetadataUpdate update = new MetadataUpdate.SetCurrentViewVersion(23);
    assertThat(MetadataUpdateParser.toJson(update)).isEqualTo(expected);
  }