### Question:
Validation { public <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) { return validator.validate(object, groups); }  @PostConstruct void postConstruct(); Set<ConstraintViolation<T>> validate(T object, Class<?>... groups); Set<ConstraintViolation<T>> validateProperty(T object, String propertyPath, Class<?>... groups); Set<ConstraintViolation<T>> validateValue(Class<T> beanType, String propertyName, Object value, Class<?>... groups); BeanDescriptor getConstraintsForClass(Class<?> clazz); T unwrap(Class<T> type); boolean isCascaded(Class beanClass, String propertyName); boolean isRequired(Class beanClass, String propertyName); boolean hasAnnotation(Class beanClass, String propertyName, Class annotationClass);  }### Answer:
@Test public void validateInvalidRoot() { RootBean rootBean = new RootBean(); NestedBean nestedBean = new NestedBean(); nestedBean.setProperty("12"); rootBean.setNestedBean(nestedBean); Set<ConstraintViolation<RootBean>> violations = validation.validate(rootBean); Assert.assertTrue(violations.size() > 0); }