### Question:
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } SimpleNumber(Object value); @Override Boolean hasData(); Number getValue(); Type getDataType(); String toString(); @Override RollupType getRollupType(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void toStringWithIntegerPrintsIntegerString() { SimpleNumber sn = new SimpleNumber(123); assertEquals("123 (int)", sn.toString()); }
@Test public void toStringWithLongPrintsLongString() { SimpleNumber sn = new SimpleNumber(123L); assertEquals("123 (long)", sn.toString()); }
@Test public void toStringWithDoublePrintsDoubleString() { SimpleNumber sn = new SimpleNumber(123.45d); assertEquals("123.45 (double)", sn.toString()); }