### Question:
NumberFormatUtils { public static Double toPercent(Number number) { return BigDecimal.valueOf(number.doubleValue()) .multiply(new BigDecimal(100)) .setScale(2, RoundingMode.HALF_UP) .doubleValue(); }  static String formatCurrency(Number number); static Double toPercent(Number number); static Double toPercent(Number number, int scale);  }### Answer:
@Test public void testPercent() { Assertions.assertEquals(Double.parseDouble("38.5"), NumberFormatUtils.toPercent(0.385f)); Assertions.assertEquals(Double.parseDouble("12.35"), NumberFormatUtils.toPercent(0.12345f)); }
@Test public void testPercentRound() { Assertions.assertEquals(Double.parseDouble("38.5"), NumberFormatUtils.toPercent(0.385f, 3)); Assertions.assertEquals(Double.parseDouble("12.345"), NumberFormatUtils.toPercent(0.12345f, 3)); }