Todo implements Serializable { public String getName() { return name; }  String getName(); void setName(String name); String getDescription(); void setDescription(String description); LocalDateTime getCreationDate(); void setCreationDate(LocalDateTime creationDate); LocalDateTime getDueDate(); void setDueDate(LocalDateTime dueDate);  }
@Test() public void testInvalidTodo() { Todo todo = new Todo(); assertNull(todo.getName()); Set<ConstraintViolation<Todo>> violations = validatorFactory.getValidator().validate(todo); LOG.log(Level.INFO, "violations.size ::" + violations.size()); assertTrue(violations.size() > 0); }