    @Test
    public void testUnpackPackage() throws Exception {

        File tmpoutdir = new File("/Users/netease/webcacheunittestfiles/", "tmpoutdir");
        FileUtils.deleteDir(tmpoutdir);
        assertTrue(tmpoutdir.mkdirs());

        String filePath = "/Users/netease/webcacheunittestfiles/web_app_new.tgz";

        Map<String, String> fileMd5List = new HashMap<String, String>();
        assertTrue(FileUtils.unpackPackage(tmpoutdir, filePath, fileMd5List));

        assertTrue(new File("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/core.css").exists());
        assertEquals(Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/core.css"),
                Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/web_app_new_full/core.css"));

        assertTrue(new File("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/core.js").exists());
        assertEquals(Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/core.js"),
                Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/web_app_new_full/core.js"));

        assertTrue(new File("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/pt_main.js").exists());
        assertEquals(Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/pt_main.js"),
                Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/web_app_new_full/pt_main.js"));

        assertTrue(new File("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/pt_projectView.js").exists());
        assertEquals(Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/pt_projectView.js"),
                Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/web_app_new_full/pt_projectView.js"));

        assertTrue(new File("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/tp_module_dashboard_index.js").exists());
        assertEquals(Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/tp_module_dashboard_index.js"),
                Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/web_app_new_full/tp_module_dashboard_index.js"));

        assertTrue(new File("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/tp_module_frames_head_index.js").exists());
        assertEquals(Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/tp_module_frames_head_index.js"),
                Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/web_app_new_full/tp_module_frames_head_index.js"));

        assertTrue(new File("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/tp_module_frames_layout_index.js").exists());
        assertEquals(Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/tp_module_frames_layout_index.js"),
                Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/web_app_new_full/tp_module_frames_layout_index.js"));

        assertTrue(new File("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/tp_module_migration_index.js").exists());
        assertEquals(Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/tmpoutdir/web_app_new/tp_module_migration_index.js"),
                Md5Utils.calculateMd5("/Users/netease/webcacheunittestfiles/web_app_new_full/tp_module_migration_index.js"));

        assertTrue(FileUtils.deleteDir(tmpoutdir));
        assertFalse(tmpoutdir.exists());

        fileMd5List.clear();
        assertFalse(FileUtils.unpackPackage(tmpoutdir, filePath, fileMd5List));
    }