Constructor<GreetingService> constructor = GreetingService.class.getConstructor( User.class );
Object[] parameterValues = new Object[] { new User( null ) };
ExecutableValidator executableValidator = getConfiguredExecutableValidator();
Set<ConstraintViolation<GreetingService>> violations = executableValidator.validateConstructorParameters(
constructor,
parameterValues
);
assertCorrectConstraintViolationMessages( violations, "name must not be null" );
assertCorrectPropertyPaths( violations, "GreetingService.arg0.name" );