public static String toJson(MetadataUpdate metadataUpdate) {
    return toJson(metadataUpdate, false);
  }
@Test
  public void testSetLocationToJson() {
    String action = MetadataUpdateParser.SET_LOCATION;
    String location = "s3://bucket/warehouse/tbl_location";
    String expected = String.format("{\"action\":\"%s\",\"location\":\"%s\"}", action, location);
    MetadataUpdate update = new MetadataUpdate.SetLocation(location);
    String actual = MetadataUpdateParser.toJson(update);
    assertThat(actual)
        .as("Remove properties should serialize to the correct JSON value")
        .isEqualTo(expected);
  }