/**
* Test for recovering all poll results by answer.
*/
@Test
public void testRetrievePollResultsByAnswer(){
final Poll poll = createPoll(myDate.getTime(), this.question, "FDKL1", this.userAccount, Boolean.TRUE, Boolean.TRUE);
final Question quest = createQuestion("Do you like futboll", "Yes/No");
final QuestionAnswer qansw = createQuestionAnswer("Yes", quest, "2020");
final QuestionAnswer qansw2 =createQuestionAnswer("No", quest, "2021");
// Create poll results for QuestionAnswer2 = 3
createPollResults(qansw2, poll);
createPollResults(qansw2, poll);
createPollResults(qansw2, poll);
// Create poll results for QuestionAnswer = 3
createPollResults(qansw, poll);
createPollResults(qansw, poll);
createPollResults(qansw, poll);
createPollResults(qansw, poll);
createPollResults(qansw, poll);
createPollResults(qansw, poll);
createPollResults(qansw, poll);
final List<Object[]> pollsResultsbyAnswer = getPollDao().retrieveResultPollsbyAnswer(poll.getPollId(), qansw.getQuestionAnswerId());
assertEquals("Should be equals", 1, pollsResultsbyAnswer.size());
for (Object[] objects : pollsResultsbyAnswer) {
if (objects[0] == qansw.getQuestionAnswerId()) {