StorageManager { protected String extractClassName(File base, File target){ int len = base.getAbsolutePath().length(); String path = target.getAbsolutePath(); String name = path.substring(len+1,path.length()-".java".length()); name = name.replaceAll("/","."); if(name.contains("\\")){ name = name.replaceAll("\\\\","."); } return name; } StorageManager(); static File getBestTestFolder(); static File getBestTestFolder(File baseDir); static File getSeedInFolder(); boolean createNewTmpFolders(); void deleteAllOldTmpFolders(); boolean clean(); String mergeAndCommitChanges(ProjectStaticData current, String[] cuts); List<TestsOnDisk> gatherGeneratedTestsOnDisk(); static Project getDatabaseProject(); File getTmpLogs(); File getTmpReports(); File getTmpTests(); File getTmpPools(); File getTmpSeeds(); boolean isStorageOk();  }
@Test public void extractClassNameTest(){ String z = File.separator; String base = z+"some"+z+"thing"+z; String packageName = "foo"; String className = "boiade"; String full = base+packageName+z+className+".java"; StorageManager storage = new StorageManager(); String result = storage.extractClassName(new File(base), new File(full)); Assert.assertEquals(packageName+"."+className, result); }