GitHubUtil { public GHRepository getRepo(String repo) throws IOException { return github.getRepository(repo); } GitHubUtil(GitHub gitHub); GitHub getGithub(); GHRepository getRepo(String repo); GHRepository createPublicRepo(String repoName); GHMyself getMyself(); GHContentSearchBuilder startSearch(); GHRepository createFork(GHRepository repo); void safeDeleteRepo(GHRepository repo); int createPullReq(GHRepository origRepo, String branch,
                                 GHRepository forkRepo, String title, String body); GHRepository tryRetrievingRepository(String repoName); GHContent tryRetrievingContent(GHRepository repo, String path, String branch); List<GHRepository> getGHRepositories(Multimap<String, String> pathToDockerfileInParentRepo,
                                                 GHMyself currentUser); boolean repoHasBranch(GHRepository repo, String branchName); Map<String, GHRepository> getReposForUserAtCurrentInstant(GHMyself user); static final String NO_BRANCH_WARN_FORMAT; }
@Test public void testGetRepo() throws Exception { GitHub github = mock(GitHub.class); when(github.getRepository(eq("repo"))).thenReturn(new GHRepository()); GitHubUtil gitHubUtil = new GitHubUtil(github); gitHubUtil.getRepo("repo"); verify(github, times(1)).getRepository(eq("repo")); }