@Test void formatShouldHaveTwoDigitPrecision() { assertThat(SizeFormat.format(1024 + 100)) .isEqualTo("1.09 KiB"); }
public static String format(long bytesCount) { Preconditions.checkArgument(bytesCount >= 0, "Formatting of a negative size is forbidden"); return Unit.locateUnit(bytesCount) .format(bytesCount); }
SizeFormat { public static String format(long bytesCount) { Preconditions.checkArgument(bytesCount >= 0, "Formatting of a negative size is forbidden"); return Unit.locateUnit(bytesCount) .format(bytesCount); } }
SizeFormat { public static String format(long bytesCount) { Preconditions.checkArgument(bytesCount >= 0, "Formatting of a negative size is forbidden"); return Unit.locateUnit(bytesCount) .format(bytesCount); }  }
SizeFormat { public static String format(long bytesCount) { Preconditions.checkArgument(bytesCount >= 0, "Formatting of a negative size is forbidden"); return Unit.locateUnit(bytesCount) .format(bytesCount); }  static String format(long bytesCount); static long parseAsByteCount(String bytesWithUnit); }
SizeFormat { public static String format(long bytesCount) { Preconditions.checkArgument(bytesCount >= 0, "Formatting of a negative size is forbidden"); return Unit.locateUnit(bytesCount) .format(bytesCount); }  static String format(long bytesCount); static long parseAsByteCount(String bytesWithUnit);  }