@Test void formatMinimumThreeDigits_positiveNumbersAndZero_returnsFormattedNumber() { assertEquals("000", NumberFormatter.formatMinimumThreeDigits(0)); assertEquals("001", NumberFormatter.formatMinimumThreeDigits(1)); assertEquals("999", NumberFormatter.formatMinimumThreeDigits(999)); assertEquals("1000", NumberFormatter.formatMinimumThreeDigits(1000)); assertEquals("9223372036854775807", NumberFormatter.formatMinimumThreeDigits(Long.MAX_VALUE)); }
public static final String formatMinimumThreeDigits(long number) { if(number < 0) { throw new RuntimeException("Encountered a negative number, which must be a bug: " + number); } return NumberFormatter.createNumberFormatWithMinimumIntegerDigits(3).format(number); }
NumberFormatter { public static final String formatMinimumThreeDigits(long number) { if(number < 0) { throw new RuntimeException("Encountered a negative number, which must be a bug: " + number); } return NumberFormatter.createNumberFormatWithMinimumIntegerDigits(3).format(number); } }
NumberFormatter { public static final String formatMinimumThreeDigits(long number) { if(number < 0) { throw new RuntimeException("Encountered a negative number, which must be a bug: " + number); } return NumberFormatter.createNumberFormatWithMinimumIntegerDigits(3).format(number); }  }
NumberFormatter { public static final String formatMinimumThreeDigits(long number) { if(number < 0) { throw new RuntimeException("Encountered a negative number, which must be a bug: " + number); } return NumberFormatter.createNumberFormatWithMinimumIntegerDigits(3).format(number); }  static final String formatMinimumThreeDigits(long number); }
NumberFormatter { public static final String formatMinimumThreeDigits(long number) { if(number < 0) { throw new RuntimeException("Encountered a negative number, which must be a bug: " + number); } return NumberFormatter.createNumberFormatWithMinimumIntegerDigits(3).format(number); }  static final String formatMinimumThreeDigits(long number);  }