survey = this.getSurveyManager().loadSurvey(survey.getId());
for (Question question: survey.getQuestions()) {
// WE SUPPOSE THAT ALL THE CHOICES CAN BE ANSWERED
int choiceAnswered = 0;
for (Choice choice: question.getChoices()) {
SingleQuestionResponse response = this.getFakeResponse();
if (choice.isFreeText()) response.setFreeText("Forza Cagliari!");
response.setChoiceId(choice.getId());
response.setQuestionId(question.getId());
response.setVoterId(1); // ALWAYS THE SAME VOTER
this._responseManager.submitResponse(response);
choiceAnswered++;
}
List<SingleQuestionResponse> list = this._responseManager.aggregateResponseByIds(null, question.getId(), null, null);
assertEquals(choiceAnswered, list.size());