### Question:
CannedPropertyValidators { public static StringPropertyValidationRules textValidator() { return new StringPropertyValidationRules(false, 32); }  static BooleanPropertyValidationRules boolValidator(); static PinPropertyValidationRules pinValidator(); static PinPropertyValidationRules optPinValidator(); static IntegerPropertyValidationRules uintValidator(int max); static StringPropertyValidationRules variableValidator(); static StringPropertyValidationRules textValidator(); static ChoicesPropertyValidationRules choicesValidator(Collection<String> values); static MenuItemValidationRules menuItemValidatorForAllItems(); static MenuItemValidationRules menuItemValidatorForSpecifcType(Class<? extends MenuItem> cls);  }### Answer:
@Test public void testStringValidator() { StringPropertyValidationRules validator = CannedPropertyValidators.textValidator(); assertFalse(validator.hasChoices()); assertThat(validator.choices()).isEmpty(); assertTrue(validator.isValueValid("")); assertTrue(validator.isValueValid("This is text")); assertFalse(validator.isValueValid("Invalid char \"")); assertFalse(validator.isValueValid("Invalid because the text is too long for the field")); }