StandardQuestionModel implements QuestionModel { @Override public boolean hasCheatedOnCurrentQuestion() { return cheatMap.get("CHEAT_" + currentIndex); } StandardQuestionModel(Question[] questions); @Override String getQuestionText(); @Override boolean hasCheatedOnCurrentQuestion(); @Override boolean isCorrectAnswer(boolean answer); @Override void gotoNextQuestion(); @Override void cheatRequested(); @Override void whenQuestionTextChanged(EventListener listener); void whenCheatRequested(DataEventListener<Boolean> listener); void setCheatedOnCurrentQuestion(boolean cheated); void saveState(StateSaver stateSaver); void loadState(StateLoader stateLoader);  }
@Test public void constructor_initializesHasCheatedOnCurrentQuestionToFalse_whenCalled() { StandardQuestionModel model = new StandardQuestionModel(new Question[]{ new Question("question1", true) }); boolean res = model.hasCheatedOnCurrentQuestion(); assertEquals(false, res); }