public static String toJson(UpdateRequirement updateRequirement) {
    return toJson(updateRequirement, false);
  }
@Test
  public void testAssertLastAssignedFieldIdToJson() {
    String requirementType = UpdateRequirementParser.ASSERT_LAST_ASSIGNED_FIELD_ID;
    int lastAssignedFieldId = 12;
    String expected =
        String.format(
            "{\"type\":\"%s\",\"last-assigned-field-id\":%d}",
            requirementType, lastAssignedFieldId);
    UpdateRequirement actual = new UpdateRequirement.AssertLastAssignedFieldId(lastAssignedFieldId);
    assertThat(UpdateRequirementParser.toJson(actual))
        .as("AssertLastAssignedFieldId should convert to the correct JSON value")
        .isEqualTo(expected);
  }