@Test(timeout = 1000)
public void testLongWithPadding() throws Exception {

  NumberFormat numberFormat = NumberFormat.getInstance();
  numberFormat.setGroupingUsed(false);
  numberFormat.setMinimumIntegerDigits(6);
  long[] testLongs = {1, 23, 456, 7890, 12345, 678901, 2345689, 0, -0, -1,
    -23, -456, -7890, -12345, -678901, -2345689};
  for (long l: testLongs) {
    StringBuilder sb = new StringBuilder();
    FastNumberFormat.format(sb, l, MIN_DIGITS);
    String fastNumberStr = sb.toString();
    Assert.assertEquals("Number formats should be equal",
        numberFormat.format(l), fastNumberStr);
  }
}