RepositoryUtil { public static File getWorkingDir(Repository repo) { return repo.getDirectory().getParentFile(); } private  RepositoryUtil(); static void closeQuietly(Repository repo); static File getWorkingDir(Repository repo);  }
@Test public void getWorkingDir() { File dir = new File("."); when(repo.getDirectory()).thenReturn(dir); assertEquals(dir.getParentFile(), RepositoryUtil.getWorkingDir(repo)); }