@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("[Bean, list "); if (_beans == null) { sb.append("NULL"); } else { sb.append('(').append(_beans.size()).append('/'); sb.append(_beans.getClass().getName()).append(") "); boolean type = false; for (CtorValueBean bean : _beans) { if (!type) { sb.append("(").append(bean.getClass().getSimpleName()).append(")"); type = true; } sb.append(bean); sb.append(' '); } } sb.append(']'); return sb.toString(); }
public void testFromLongCtor() throws Exception { // Must use something that is forced as Long... long value = 12345678901244L; CtorValueBean result = MAPPER.readValue("" + value, CtorValueBean.class); assertEquals("" + value, result.toString()); }
public void testFromIntCtor() throws Exception { CtorValueBean result = MAPPER.readValue("13", CtorValueBean.class); assertEquals("13", result.toString()); }