public static UpdateRequirement fromJson(String json) {
    return JsonUtil.parse(json, UpdateRequirementParser::fromJson);
  }
@Test
  public void testAssertLastAssignedPartitionIdFromJson() {
    String requirementType = UpdateRequirementParser.ASSERT_LAST_ASSIGNED_PARTITION_ID;
    int lastAssignedPartitionId = 1004;
    String json =
        String.format(
            "{\"type\":\"%s\",\"last-assigned-partition-id\":%d}",
            requirementType, lastAssignedPartitionId);
    UpdateRequirement expected =
        new UpdateRequirement.AssertLastAssignedPartitionId(lastAssignedPartitionId);
    assertEquals(requirementType, expected, UpdateRequirementParser.fromJson(json));
  }