### Question:
ScratchDirManager { public File getNewScratchDir() throws IOException { return getNewScratchDir(null); } ScratchDirManager(Path scratchDir, long ttl);  ScratchDirManager(); File getNewScratchDir(); File getNewScratchDir(String servicePrefix); void cleanup1(long cutOffTime); final static ScratchDirManager SCRATCH_DIR_FACTORY; }### Answer:
@Test public void testGetNewScratchDir() throws Exception { Path root = Paths.get(FileUtils.getTempDirectoryPath(), "scratch"); ScratchDirManager manager = new ScratchDirManager(root, 0); File testDir = manager.getNewScratchDir("a"); FileUtils.forceMkdir(testDir); Thread.sleep(2000); manager.cleanup1(100); Assert.assertNull(testDir.list()); }