public static String toJson(MetadataUpdate metadataUpdate) {
    return toJson(metadataUpdate, false);
  }
@Test
  public void testRemovePropertiesToJson() {
    String action = MetadataUpdateParser.REMOVE_PROPERTIES;
    Set<String> toRemove = ImmutableSet.of("prop1", "prop2");
    String toRemoveAsJSON = "[\"prop1\",\"prop2\"]";
    String expected = String.format("{\"action\":\"%s\",\"removals\":%s}", action, toRemoveAsJSON);
    MetadataUpdate update = new MetadataUpdate.RemoveProperties(toRemove);
    String actual = MetadataUpdateParser.toJson(update);
    assertThat(actual)
        .as("Remove properties should serialize to the correct JSON value")
        .isEqualTo(expected);
  }