You could use:
constraintViolation.getConstraintDescriptor().getAnnotation()
to get type of the annotation used to produce this violatation and then compare it with what you expect.
In case of multiple violatation you might need to iterate over the collection.
So, in the end
assertTrue(isExpectedConstraintViolated(NotBlank.class, constraintViolations))
public boolean isExpectedConstraintViolated(Class<?> clazz, Set<ConstraintViolation<Rule>> constraintViolations){
for(ConstraintViolation<Rule> violaton: constraintViolations){
if(clazz.equals(violaton.getConstraintDescriptor().getAnnotation().annotationType())){
return true;
}
}
return false;
}
should do the job.