GHUser ghUser = PowerMockito.mock(GHUser.class);
PowerMockito.when(ghUser.getLogin()).thenReturn("theusername");
PowerMockito.when(ghRepository.getOwner()).thenReturn(ghUser);
GithubAccessTokenRepository ghAccessTokenRepository = new GithubAccessTokenRepository();
PowerMockito.whenNew(GithubAccessTokenRepository.class).withNoArguments().thenReturn(ghAccessTokenRepository);
String dotCiYaml = "environment:\n language: ruby\n\nbuild:\n before: echo \"get out of here denton\"\n run:\n unit: echo \"Unit test\"\n integration: echo \"Integration test\"\n after: echo it works right\n";
GHContent content = PowerMockito.mock(GHContent.class);
PowerMockito.when(content.getContent()).thenReturn(dotCiYaml);