### Question:
FileUtil extends cn.hutool.core.io.FileUtil { public static String getSize(long size) { String resultSize; if (size / GB >= 1) { resultSize = DF.format(size / (float) GB) + "GB "; } else if (size / MB >= 1) { resultSize = DF.format(size / (float) MB) + "MB "; } else if (size / KB >= 1) { resultSize = DF.format(size / (float) KB) + "KB "; } else { resultSize = size + "B "; } return resultSize; }  static File toFile(MultipartFile multipartFile); static String getExtensionName(String filename); static String getFileNameNoEx(String filename); static String getSize(long size); static File upload(MultipartFile file, String filePath); static void downloadExcel(List<Map<String, Object>> list, HttpServletResponse response); static String getFileType(String type); static void checkSize(long maxSize, long size); static boolean check(File file1, File file2); static boolean check(String file1Md5, String file2Md5); static void downloadFile(HttpServletRequest request, HttpServletResponse response, File file, boolean deleteOnExit); static String getMd5(File file); static final String SYS_TEM_DIR; static final String IMAGE; static final String TXT; static final String MUSIC; static final String VIDEO; static final String OTHER; }### Answer:
@Test public void testGetSize() { assertEquals("1000B ", getSize(1000)); assertEquals("1.00KB ", getSize(1024)); assertEquals("1.00MB ", getSize(1048576)); assertEquals("1.00GB ", getSize(1073741824)); }