CliGitInit implements IGitInit { public GitInitResponse init(File repoDirectory, GitInitOptions options) throws JavaGitException, IOException { CheckUtilities.checkFileValidity(repoDirectory); GitInitParser parser = new GitInitParser(); List<String> command = buildCommand(repoDirectory, options); GitInitResponse response = (GitInitResponse) ProcessUtilities.runCommand(repoDirectory, command, parser); if (response.containsError()) { throw new JavaGitException(418001, "Git Init error"); } return response; }  GitInitResponse init(File repoDirectory, GitInitOptions options); GitInitResponse init(File repoDirectory);  }
@Test public void testGitInitaliaze() throws IOException, JavaGitException { CliGitInit gitInit = new CliGitInit(); GitInitOptions options = new GitInitOptions(); GitInitResponse response = gitInit.init(repoDirectory, options); if (!response.isInitialized()) { fail("Failed to initialize git repository"); } }