### Question:
BigDecimals { public static Mapper<BigDecimal, BigDecimal> toScaled(final Integer scale, final RoundingMode roundingMode) { return new Mapper<BigDecimal, BigDecimal>() { @Override public BigDecimal map(BigDecimal input) { return input.setScale(scale, roundingMode); } }; } private  BigDecimals(); static Mapper<String, BigDecimal> fromStringToBigDecimal(); static Mapper<Integer, BigDecimal> fromIntegerToBigDecimal(); static Mapper<Long, BigDecimal> fromLongToBigDecimal(); static Mapper<BigInteger, BigDecimal> fromBigIntegerToBigDecimal(); static Mapper<Double, BigDecimal> fromDoubleToBigDecimal(); static Mapper<BigDecimal, String> toPlainString(); static Mapper<BigDecimal, BigDecimal> toScaled(final Integer scale, final RoundingMode roundingMode); static BigDecimal bigDecimal(Integer value); static BigDecimal bigDecimal(Long value); static BigDecimal bigDecimal(Double value); static BigDecimal bigDecimal(String value);  }### Answer:
@Test public void returnsMapperWhichScalesBigDecimalAccordingToSuppliedArguments() { assertThat(BigDecimals.toScaled(2, RoundingMode.HALF_UP).map(new BigDecimal("123.455")), is(new BigDecimal("123.46"))); assertThat(BigDecimals.toScaled(1, RoundingMode.HALF_DOWN).map(new BigDecimal("123.45")), is(new BigDecimal("123.4"))); }