assertTrue(validate(new Person(30, "Steven"), text, mockAccessor));
assertFalse(validate(new Person(7, "Benjamin"), text, mockAccessor));
}
public void testTranslatorErrorArgs() {
MessageSourceAccessor mockAccessor = new MessageSourceAccessor(null) {
public String getMessage(String code, String defaultMessage) {
assertEquals("not_old_enough", code);
assertEquals("Customers must be older than {0}.", defaultMessage);
return defaultMessage;
}