public static UpdateRequirement fromJson(String json) {
    return JsonUtil.parse(json, UpdateRequirementParser::fromJson);
  }
@Test
  public void testAssertDefaultSpecIdFromJson() {
    String requirementType = UpdateRequirementParser.ASSERT_DEFAULT_SPEC_ID;
    int specId = 5;
    String json =
        String.format("{\"type\":\"%s\",\"default-spec-id\":%d}", requirementType, specId);
    UpdateRequirement expected = new UpdateRequirement.AssertDefaultSpecID(specId);
    assertEquals(requirementType, expected, UpdateRequirementParser.fromJson(json));
  }