GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoWithVersionControl { protected Git getGit() { return git; } GitNotebookRepo(); @VisibleForTesting  GitNotebookRepo(ZeppelinConfiguration conf); @Override void init(ZeppelinConfiguration conf); @Override void move(String noteId,
                   String notePath,
                   String newNotePath,
                   AuthenticationInfo subject); @Override void move(String folderPath, String newFolderPath,
                   AuthenticationInfo subject); @Override Revision checkpoint(String noteId,
                             String notePath,
                             String commitMessage,
                             AuthenticationInfo subject); @Override synchronized Note get(String noteId,
                               String notePath,
                               String revId,
                               AuthenticationInfo subject); @Override List<Revision> revisionHistory(String noteId,
                                        String notePath,
                                        AuthenticationInfo subject); @Override Note setNoteRevision(String noteId, String notePath, String revId,
                              AuthenticationInfo subject); @Override void close();  }
@Test public void initNonemptyNotebookDir() throws IOException, GitAPIException { File dotGit = new File(Joiner.on(File.separator).join(notebooksDir, ".git")); assertThat(dotGit.exists()).isEqualTo(false); notebookRepo = new GitNotebookRepo(conf); Git git = notebookRepo.getGit(); Truth.assertThat(git).isNotNull(); assertThat(dotGit.exists()).isEqualTo(true); assertThat(notebookRepo.list(null)).isNotEmpty(); List<DiffEntry> diff = git.diff().call(); Truth.assertThat(diff).isNotEmpty(); }