protected function setQuestionText(Question $question, $question_text) {
    // Choice question has a different constructor signature.
    if ($question instanceof ChoiceQuestion) {
      $question->__construct($question_text, $question->getChoices(), $question->getDefault());
    }
    else {
      $question->__construct($question_text, $question->getDefault());
    }
  }