code: 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);
  		}
  
  	}
docs: This method checks the violations against expected violations.
  
  @param violations
  validation violations
  @param expectedValidationViolations
  list of expected validation violation message templates