final Question question,
final String hash,
final UserAccount userAccount,
final Boolean pollCompleted,
final Boolean published){
final Poll poll = new Poll();
poll.setCreateDate(createdDate);
poll.setCloseAfterDate(true);
poll.setAdditionalInfo("additional");
poll.setClosedDate(new Date());
poll.setClosedQuota(100);
poll.setCustomFinalMessage(CustomFinalMessage.FINALMESSAGE);
poll.setCustomMessage(true);
poll.setDislikeVote(1L);
poll.setLikeVote(1L);
poll.setEndDate(new Date());
poll.setFavourites(true);
poll.setNumbervotes(600L);
poll.setQuestion(question);
poll.setPollHash(hash);
poll.setEditorOwner(userAccount);
poll.setOwner(userAccount.getAccount());
poll.setPollCompleted(pollCompleted);
poll.setPublish(published);
poll.setShowComments(CommentOptions.APPROVE);
getPollDao().saveOrUpdate(poll);
return poll;
}