ChoiceAnswerFormat extends AnswerFormat { public Choice[] getChoices() { return choices.clone(); } ChoiceAnswerFormat(AnswerFormat.ChoiceAnswerStyle answerStyle, Choice... choices); @Override QuestionType getQuestionType(); Choice[] getChoices();  }
@Test public void testCount() throws Exception { assertEquals("Correctly returns the count of the choices", 4, format.getChoices().length); format = new ChoiceAnswerFormat(AnswerFormat.ChoiceAnswerStyle.SingleChoice, c1, c2, c3); assertEquals("Correctly returns the count of the choices", 3, format.getChoices().length); }
@Test public void testTextChoice() throws Exception { assertEquals("Maintains the correct order of the choices", c1, format.getChoices()[0]); assertEquals("Maintains the correct order of the choices", c3, format.getChoices()[2]); }