public void testAddMultipleVote() {
long firstOptionId = 1;
long secondOptionId = 2;
List<Long> optionIds = Arrays.asList(firstOptionId, secondOptionId);
Poll poll = createPoll(POLL_ID, optionIds);
PollDto pollDto = new PollDto(poll);
Mockito.when(pollService.vote(POLL_ID, optionIds)).thenReturn(poll);
PollDto resultPollDto = pollController.addMultipleVote(POLL_ID, pollDto);
Assert.assertEquals(resultPollDto.getId(), poll.getId(), "The id must be the same.");
PollOptionDto firstOptionDto = resultPollDto.getPollOptions().get(0);
Assert.assertEquals(firstOptionDto.getId(), firstOptionId,
"The id must be the same");
PollOptionDto secondOptionDto = resultPollDto.getPollOptions().get(1);
Assert.assertEquals(secondOptionDto.getId(), secondOptionId,
"The id must be the same");
}