Constructor<GreetingService> constructor = GreetingService.class.getConstructor( String.class, String.class );
ExecutableValidator executableValidator = getConfiguredExecutableValidator();
Set<ConstraintViolation<GreetingService>> violations = executableValidator.validateConstructorReturnValue(
constructor,
new GreetingService( "", "" )
);
assertCorrectConstraintViolationMessages( violations, "default message" );