code: public void setAnswer(String variable, int value) {
          FormField field = getField(variable);
          if (field == null) {
              throw new IllegalArgumentException("Field not found for the specified variable name.");
          }
          validateThatFieldIsText(field);
          setAnswer(field, value);
      }
docs: Sets a new int value to a given form's field. The field whose variable matches the
  requested variable will be completed with the specified value. If no field could be found
  for the specified variable then an exception will be raised.
  
  @param variable the variable name that was completed.
  @param value the int value that was answered.
  @throws IllegalStateException if the form is not of type "submit".
  @throws IllegalArgumentException if the form does not include the specified variable or
  if the answer type does not correspond with the field type.