### Question:
TextUtil { public static String formetByteLength(long size) { String fileSizeString = ""; if (size < 1024) { fileSizeString = size + "B"; } else if (size < 1048576) { fileSizeString = decimalFormat.format(size / 1024.0) + "KB"; } else if (size < 1073741824) { fileSizeString = decimalFormat.format(size / 1048576.0) + "MB"; } else { fileSizeString = decimalFormat.format(size / 1073741824.0) + "GB"; } return fileSizeString; }  static boolean isEmpty(String text); static String MD5(String content); static String SHA1(String content); static String SHA224(String content); static String SHA256(String content); static String SHA384(String content); static String SHA512(String content); static byte[] digest(byte[] data, String algorithm); static String HmacMD5(String content, String key); static String HmacSHA1(String content, String key); static String HmacSHA224(String content, String key); static String HmacSHA256(String content, String key); static String HmacSHA384(String content, String key); static String HmacSHA512(String content, String key); static byte[] Hmac(byte[] data, String algorithm, byte[] key); static String encodeURL(String data, String enc); static String decodeURL(String data, String enc); static String string2Unicode(String string); static String unicode2String(String unicode); static String formetByteLength(long size); static String money2Chinese(double money); static String money2ChineseTraditional(double money); static String number2Chinese(long number); static String bytes2Hex(byte... bytes); static String bytes2Hex(byte[] bytes, boolean space); static byte[] hex2Bytes(String inHex); static String encodeBase64(byte[] content); static byte[] decodeBase64(String content);  }### Answer:
@Test public void formetByteLength() { assertEquals("1.00KB", TextUtil.formetByteLength(1024)); assertEquals("1.00MB", TextUtil.formetByteLength(1024 * 1024)); assertEquals("1.00GB", TextUtil.formetByteLength(1024 * 1024 * 1024)); assertEquals("1.05GB", TextUtil.formetByteLength(1024 * 1024 * 1024 + (1024 * 1024 * 50))); }