public static UpdateRequirement fromJson(String json) {
    return JsonUtil.parse(json, UpdateRequirementParser::fromJson);
  }
@Test
  public void testUpdateRequirementWithoutRequirementTypeCannotParse() {
    List<String> invalidJson =
        ImmutableList.of(
            "{\"type\":null,\"uuid\":\"2cc52516-5e73-41f2-b139-545d41a4e151\"}",
            "{\"uuid\":\"2cc52516-5e73-41f2-b139-545d41a4e151\"}");

    for (String json : invalidJson) {
      assertThatThrownBy(() -> UpdateRequirementParser.fromJson(json))
          .isInstanceOf(IllegalArgumentException.class)
          .hasMessage("Cannot parse update requirement. Missing field: type");
    }
  }