/**
* Test {@link SurveyBean}.
*/
@Test
public void testSurveyBean(){
final SurveyBean surveyBean = new SurveyBean();
final Calendar myDate = Calendar.getInstance();
final List<HashTagBean> tagBean = new ArrayList<HashTagBean>();
tagBean.add(createUnitHashTag("Europa", 1L));
tagBean.add(createUnitHashTag("Asia", 2L));
tagBean.add(createUnitHashTag("Africa", 3L));
surveyBean.setSid(1L);
surveyBean.setTicket(1);
surveyBean.setStartDate(myDate.getTime());
myDate.add(Calendar.DATE, +8);
surveyBean.setEndDate(myDate.getTime());
myDate.add(Calendar.DATE, +2);
surveyBean.setDateInterview(myDate.getTime());
surveyBean.setComplete("complete");
surveyBean.setOwnerUsername("paola");
surveyBean.setCustomMessage(Boolean.TRUE);
surveyBean.setCustomStartMessages("Custom start messages");
surveyBean.setMultipleResponse(MultipleResponse.SINGLE);
surveyBean.setCustomFinalMessage(CustomFinalMessage.FINALMESSAGE);
surveyBean.setShowProgressBar(Boolean.TRUE);
surveyBean.setOptionalTitle("Optional Title");
surveyBean.setPasswordRestrictions(Boolean.FALSE);
surveyBean.setIpRestriction(Boolean.TRUE);
surveyBean.setPassProtection("");
surveyBean.setIpProtection("");
surveyBean.setCloseAfterDate(Boolean.FALSE);
myDate.add(Calendar.DATE, +2);
surveyBean.setClosedDate(myDate.getTime());
surveyBean.setCloseAfterquota(Boolean.TRUE);
surveyBean.setClosedQuota(20);
surveyBean.setShowResults(Boolean.TRUE);
surveyBean.setNumbervotes(10L);
surveyBean.setHits(25L);
surveyBean.setShowAdditionalInfo(Boolean.TRUE);
surveyBean.setAdditionalInfo("Additional Info");
surveyBean.setNotifications(Boolean.TRUE);
surveyBean.setName("My first Survey");
surveyBean.setRelevance(85L);
surveyBean.setCreatedAt(myDate.getTime());
surveyBean.setLikeVote(300L);
surveyBean.setDislikeVote(150L);
surveyBean.setFavorites(Boolean.TRUE);
surveyBean.setHashTags(tagBean);
surveyBean.setTotalComments(25L);
assertNotNull(surveyBean.getSid());
assertNotNull(surveyBean.getTicket());
assertNotNull(surveyBean.getStartDate());
assertNotNull(surveyBean.getEndDate());
assertNotNull(surveyBean.getDateInterview());
assertNotNull(surveyBean.getComplete());
assertNotNull(surveyBean.getOwnerUsername());
assertNotNull(surveyBean.getCustomMessage());
assertNotNull(surveyBean.getCustomStartMessages());
assertNotNull(surveyBean.getMultipleResponse());
assertNotNull(surveyBean.getShowProgressBar());
assertNotNull(surveyBean.getOptionalTitle());
assertNotNull(surveyBean.getPasswordRestrictions());
assertNotNull(surveyBean.getIpRestriction());
assertNotNull(surveyBean.getPassProtection());
assertNotNull(surveyBean.getIpProtection());
assertNotNull(surveyBean.getCloseAfterDate());
assertNotNull(surveyBean.getClosedDate());
assertNotNull(surveyBean.getClosedQuota());
assertNotNull(surveyBean.getShowResults());
assertNotNull(surveyBean.getNumbervotes());
assertNotNull(surveyBean.getHits());
assertNotNull(surveyBean.getShowAdditionalInfo());
assertNotNull(surveyBean.getAdditionalInfo());
assertNotNull(surveyBean.getNotifications());
assertNotNull(surveyBean.getName());
assertNotNull(surveyBean.getRelevance());
assertNotNull(surveyBean.getCreatedAt());
assertNotNull(surveyBean.getLikeVote());
assertNotNull(surveyBean.getDislikeVote());
assertNotNull(surveyBean.getFavorites());
assertNotNull(surveyBean.getHashTags());
assertNotNull(surveyBean.getTotalComments());
}