### Question:
Decimal128 extends Number implements Serializable, Comparable<Decimal128> { @Override public String toString() { if (isNaN()) { return "NaN"; } if (isInfinite()) { return isNegative() ? "-Infinity" : "Infinity"; } return (isNegative() ? "-" : "") + toStringWithBigDecimal(); } Decimal128(long low, long high);  Decimal128(BigDecimal value); private  Decimal128(BigDecimal initialValue, boolean isNegative); static Decimal128 fromNumber(Number value); long getLow(); long getHigh(); BigDecimal toBigDecimal(); @Override String toString(); @Override int intValue(); @Override long longValue(); @Override float floatValue(); @Override double doubleValue(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Decimal128 o); static final Decimal128 ONE; static final Decimal128 TWO; static final Decimal128 NaN; static final Decimal128 POSITIVE_ZERO; static final Decimal128 NEGATIVE_ZERO; static final Decimal128 POSITIVE_INFINITY; static final Decimal128 NEGATIVE_INFINITY; }### Answer:
@Test void testToString() throws Exception { assertThat(new Decimal128(new BigDecimal("1e1000"))).hasToString("1E+1000"); assertThat(new Decimal128(new BigDecimal("1000"))).hasToString("1000"); assertThat(new Decimal128(new BigDecimal("1000.987654321"))).hasToString("1000.987654321"); assertThat(new Decimal128(new BigDecimal("1000").scaleByPowerOfTen(2))).hasToString("1.000E+5"); assertThat(Decimal128.POSITIVE_INFINITY).hasToString("Infinity"); assertThat(Decimal128.NEGATIVE_INFINITY).hasToString("-Infinity"); assertThat(Decimal128.NaN).hasToString("NaN"); }