CurrencyFormatter { @Nullable public static String priceString(@Nullable Integer cents) { if (cents == null) return null; return new BigDecimal(cents).movePointLeft(2).toPlainString(); }  @Nullable static String priceString(@Nullable Integer cents);  }
@Test public void testCurrencyFormat() { assertEquals("10.00", CurrencyFormatter.priceString(1000)); assertEquals("39.50", CurrencyFormatter.priceString(3950)); assertEquals("0.01", CurrencyFormatter.priceString(1)); assertEquals("250.34", CurrencyFormatter.priceString(25034)); assertEquals("1747.20", CurrencyFormatter.priceString(174720)); assertEquals("1234567.89", CurrencyFormatter.priceString(123456789)); }