### Question:
ByteFormat { public String format(int count) { if (count < 0) { throw new NumberFormatException("ByteFormat: Byte count cannot be less than 0"); } for (int i = 0; i < names.length; ++i) { if (count < LIMITS[i]) { continue; } final float fVal = ((float) count) / LIMITS[i]; final String name = i == names.length - 1 && fVal != 1.0 ? names[i] + "s" : names[i]; synchronized (numberFormat) { return numberFormat.format(fVal) + name; } } return "0" + names[names.length - 1] + "s"; } ByteFormat(); String format(int count); String format2(int count); String format(long count); String format2(long count); void setMinimumFractionDigits(int d); void setMaximumFractionDigits(int d); void setNames(String[] names);  }### Answer:
@Test public void formatTest() { ByteFormat bf = new ByteFormat(); Assert.assertEquals("100 bytes", bf.format(100)); Assert.assertEquals("999 bytes", bf.format(999L)); }