@Test
public void cleanDirectory() throws Exception {

    String filePath = System.getProperty("java.io.tmpdir") + File.separator
        + "FileTest" + 1;
    FileUtils.string2File(new File(filePath, "xx.tmp"), "helloworld!");
    Assert.assertTrue(new File(filePath, "xx.tmp").exists());
    String ct = FileUtils.file2String(new File(filePath, "xx.tmp"));
    Assert.assertTrue(ct.equals("helloworld!"));
    List<String> datas = FileUtils.readLines(new File(filePath, "xx.tmp"));
    Assert.assertTrue(datas.size() == 1);
    FileUtils.cleanDirectory(new File(filePath));
    Assert.assertFalse(new File(filePath).exists());
}