ErrorInfo { public ErrorInfo repr(String repr) { builder.put(REPR, repr); return this; } ErrorInfo(ErrorType type);  ErrorInfo(ErrorType type, ErrorLevel level); ErrorInfo child(ErrorInfo child); ErrorInfo child(List<ErrorInfo> errors); ErrorInfo code(Object code); ErrorInfo line(int line); ErrorInfo offset(int offset); ErrorInfo type(Object type); ErrorInfo data(Object data); ErrorInfo name(Object name); ErrorInfo limit(Object limit); ErrorInfo repr(String repr); MapBuilder<String, Object> getBuilder(); ErrorType getType(); ErrorLevel getLevel(); List<ErrorInfo> getChildren(); String getMessage(); String getMessage(boolean withChildren); JsonNode toJson();  }
@Test public void testRepr() { ErrorInfo info = new ErrorInfo(DUMMY1); info.name("foo").line(7); MapBuilder<String, Object> builder = info.getBuilder(); assertEquals(builder.get().get("name"), "foo"); assertEquals(info.getMessage(), "7: foo ? ?"); info.repr("bar"); assertEquals(info.getMessage(), "7: foo ? bar"); }