### Question:
Cache { public void clear () throws IOException { FileUtils.recursiveDeleteDirectory(new File(CACHE_PATH), false); createRequiredDirs(); } protected  Cache(String path); static void init(String path); static Cache getInstance(); String getPath(); void createDirIfAbsent(String dirName); String getCachePath(String dirName); String getCacheFilePath(String filePath); void clear();  }### Answer:
@Test public void testClear () throws IOException { if (!new File("../temp/junit-test/").exists()) { new File("../temp/junit-test/").mkdirs(); } if (!new File("../temp/junit-test/test.txt").exists()) { new File("../temp/junit-test/test.txt").createNewFile(); } Cache cache = new Cache("../temp/junit-test/"); assertEquals(true, new File("../temp/junit-test/").exists()); assertEquals(true, new File("../temp/junit-test/").isDirectory()); assertEquals(true, new File("../temp/junit-test/test.txt").exists()); cache.clear(); assertEquals(false, new File("../temp/junit-test/test.txt").exists()); assertEquals(true, new File("../temp/junit-test/").exists()); assertEquals(true, new File("../temp/junit-test/").isDirectory()); }