### Question:
StringUtil { public static String getSizeString(long size){ if(size < 1024){ return String.format(Locale.getDefault(), "%d B", size); }else if(size < 1024 * 1024){ float sizeK = size / 1024f; return String.format(Locale.getDefault(), "%.2f KB", sizeK); }else if(size < 1024 * 1024 * 1024){ float sizeM = size / (1024f * 1024f); return String.format(Locale.getDefault(), "%.2f MB", sizeM); }else if(size / 1024 < 1024 * 1024 * 1024){ float sizeG = size / (1024f * 1024f * 1024f); return String.format(Locale.getDefault(), "%.2f GB", sizeG); } return null; }  static String getSizeString(long size); static boolean equals(String a, String b);  }### Answer:
@Test public void getSizeString() { String msg = StringUtil.getSizeString(102400); assertEquals("100.00 KB", msg); }