assertCorrectConstraintTypes( constraintViolations, Max.class );
}
@Test
public void testOptionalUnwrappedExecutableParameter() throws Exception {
ExecutableValidator executableValidator = validator.forExecutables();
Method method = Baz.class.getMethod( "setOptionalLong", Optional.class );
Object[] values = { Optional.of( 2L ) };
Set<ConstraintViolation<Baz>> constraintViolations = executableValidator.validateParameters(
new Baz(),
method,
values
);
assertNumberOfViolations( constraintViolations, 1 );