FileUtil { public static File createTempDirectory() throws IOException { File tmp = File.createTempFile("bpelunit", ""); tmp.delete(); tmp.mkdir(); return tmp; } private  FileUtil(); static File createTempDirectory(); static byte[] readFile(File f); static String getFileNameWithoutSuffix(String fileName);  }
@Test public void testCreateTempDirectory() throws Exception { File f = null; try { f = FileUtil.createTempDirectory(); assertTrue(f.exists()); assertTrue(f.isDirectory()); assertEquals(0, f.list().length); } finally { if (f != null) { f.delete(); } } }