MathFunctions { public static Function<Number, String> percent(int significantDigits) { return new Percent(significantDigits); }  static Function<Number, Integer> plus(int addend); static Function<Number, Long> plus(long addend); static Function<Number, Double> plus(final double addend); static Function<Number, Integer> times(final int multiplicand); static Function<Number, Long> times(long multiplicand); static Function<Number, Double> times(final double multiplicand); static Function<Number, Double> divide(double divisor); static Function<Number, String> readableString(int significantDigits, int maxLen); static Function<Number, String> percent(int significantDigits);  }
@Test public void testPercent() { Assert.assertEquals(MathFunctions.percent(3).apply(0.0123456), "1.23%"); }