@@ -0,0 +1,994 @@
+package me.zhengjie.utils;%0A%0Aimport org.junit.Test;%0Aimport org.springframework.mock.web.MockMultipartFile;%0A%0Aimport static org.junit.Assert.*;%0Aimport static me.zhengjie.utils.FileUtil.*;%0A%0Apublic class FileUtilTest %7B%0A%0A    @Test%0A    public void testToFile() %7B%0A        long retval = toFile(new MockMultipartFile(%22foo%22, (byte%5B%5D) null)).getTotalSpace();%0A        assertEquals(500695072768L, retval);%0A    %7D%0A%0A    @Test%0A    public void testGetExtensionName() %7B%0A        assertEquals(%22foo%22, getExtensionName(%22foo%22));%0A        assertEquals(%22exe%22, getExtensionName(%22bar.exe%22));%0A    %7D%0A%0A    @Test%0A    public void testGetFileNameNoEx() %7B%0A        assertEquals(%22foo%22, getFileNameNoEx(%22foo%22));%0A        assertEquals(%22bar%22, getFileNameNoEx(%22bar.txt%22));%0A    %7D%0A%0A    @Test%0A    public void testGetSize() %7B%0A        assertEquals(%221000B   %22, getSize(1000));%0A        assertEquals(%221.00KB   %22, getSize(1024));%0A        assertEquals(%221.00MB   %22, getSize(1048576));%0A        assertEquals(%221.00GB   %22, getSize(1073741824));%0A    %7D%0A%7D%0A

Add unit tests for me.zhengjie.utils.FileUtil