File (String name) { try { File root = new File(TempDirTestCase.class.getResource(".").toURI()); File result = new File(root, name); deleteDir(result); result.mkdirs(); return result; } catch (URISyntaxException e) { throw new RuntimeException(e); } }