public void checkExpectedValidationViolations ( Set < ConstraintViolation < T > > violations , List < String > expectedValidationViolations ) { if ( violations != null && expectedValidationViolations != null ) { List < String > givenViolations = new ArrayList < String > ( ) ; for ( ConstraintViolation < T > violation : violations ) { givenViolations . add ( violation . getMessageTemplate ( ) ) ; } checkViolations ( givenViolations , expectedValidationViolations ) ; } }
This method checks the violations against expected violations .