assertThat(e0.getName(), nullValue());
assertThat(e0.getMessage(), equalTo("a"));
}
public void form_message_template() {
FormResponse res = new FormResponseBuilder()
.addMessage("%s:%d", "a", Integer.valueOf(1)).toField("f")
.get();
assertThat(res.isValid(), equalTo(false));
List<Error> errors = res.getErrors();
assertThat(errors.size(), equalTo(1));
Error e0 = errors.get(0);
assertThat(e0.getName(), equalTo("f"));
assertThat(e0.getMessage(), equalTo("a:1"));