### Question:
TopicDraft extends Entity { public void setPollItemsValue(String pollItemsValue) { this.pollItemsValue = pollItemsValue; } TopicDraft();  TopicDraft(JCUser topicStarter, String title, String content); String getTitle(); void setTitle(String title); String getContent(); void setContent(String content); JCUser getTopicStarter(); void setTopicStarter(JCUser topicStarter); DateTime getLastSaved(); void setLastSaved(DateTime lastSaved); String getPollTitle(); void setPollTitle(String pollTitle); String getPollItemsValue(); void setPollItemsValue(String pollItemsValue); long getBranchId(); void setBranchId(long branchId); String getTopicType(); void setTopicType(String topicType); void updateLastSavedTime(); boolean isCodeReview(); boolean isPlugable();  }### Answer:
@Test public void validationOfDraftWithoutPollItemsValueShouldPass() { TopicDraft draft = ObjectsFactory.getDefaultTopicDraft(); draft.setPollItemsValue(null); Set<ConstraintViolation<TopicDraft>> constraintViolations = validator.validate(draft); assertEquals(constraintViolations.size(), 0); }
@Test public void validationOfDraftWithTooManyOfPollItemsShouldFail() { TopicDraft draft = ObjectsFactory.getDefaultTopicDraft(); String pollItemsValue = ""; for (int i = 0; i < 51; i++) { pollItemsValue += RandomStringUtils.random(15) + "\n"; } draft.setPollItemsValue(pollItemsValue); Set<ConstraintViolation<TopicDraft>> constraintViolations = validator.validate(draft); assertEquals(constraintViolations.size(), 1); }