### Question:
ExportTreeManager { void prepareTree() { File root = fileUtilsWrapper.getCineLogRoot(); createIfNotExist(String.format("%s/saves/%s", root.getAbsolutePath(), subDir)); } ExportTreeManager(String subDir);   ExportTreeManager(FileUtilsWrapper fileUtilsWrapper, String subDir);   }### Answer:
@Test public void prepareTreeCreateDirs() { doReturn(externalRoot).when(fileUtilsWrapper).getCineLogRoot(); doReturn("/root/CineLog").when(externalRoot).getAbsolutePath(); File movieCinelogSaves = mock(File.class); doReturn(movieCinelogSaves).when(fileUtilsWrapper).getFile("/root/CineLog/saves/movie"); doReturn(false).when(movieCinelogSaves).exists(); new ExportTreeManager(fileUtilsWrapper, "movie").prepareTree(); verify(movieCinelogSaves).mkdirs(); }
@Test public void prepareTreeDoNotCreate() { doReturn(externalRoot).when(fileUtilsWrapper).getCineLogRoot(); doReturn("/root/CineLog").when(externalRoot).getAbsolutePath(); File movieCinelogSaves = mock(File.class); doReturn(movieCinelogSaves).when(fileUtilsWrapper).getFile("/root/CineLog/saves/movie"); doReturn(true).when(movieCinelogSaves).exists(); new ExportTreeManager(fileUtilsWrapper, "movie").prepareTree(); verify(movieCinelogSaves, never()).mkdirs(); }