### Question:
FileUtil extends cn.hutool.core.io.FileUtil { public static File toFile(MultipartFile multipartFile) { String fileName = multipartFile.getOriginalFilename(); String prefix = "." + getExtensionName(fileName); File file = null; try { file = File.createTempFile(IdUtil.simpleUUID(), prefix); multipartFile.transferTo(file); } catch (IOException e) { log.error(e.getMessage(), e); } return file; }  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 testToFile() { long retval = toFile(new MockMultipartFile("foo", (byte[]) null)).getTotalSpace(); assertEquals(500695072768L, retval); }