//then
Assert.assertTrue(isValid, "Regular characters considered invalid");
}
private NoSpecialCharsValidator initializeValidator(Class<?> classWithAnnotation) throws NoSuchFieldException {
NoSpecialChars constraint = classWithAnnotation.getField("field").getAnnotation(NoSpecialChars.class);
NoSpecialCharsValidator validator = new NoSpecialCharsValidator();
validator.initialize(constraint);
return validator;
}