entity.setManyToOne(null); // invalid - cannot be null
DefaultValidationAnnotationHandlerRegistry registry = new DefaultValidationAnnotationHandlerRegistry();
registry.registerPropertyHandler(new JpaBasicAnnotationHandler());
registry.registerPropertyHandler(new JpaColumnAnnotationHandler());
registry.registerPropertyHandler(new JpaManyToOneAnnotationHandler());
registry.registerPropertyHandler(new JpaOneToOneAnnotationHandler());
AnnotationBeanValidationConfigurationLoader loader = new AnnotationBeanValidationConfigurationLoader();
loader.setHandlerRegistry(registry);
BeanValidator validator = new BeanValidator(loader);