@Test
public void testForkRepositoriesFound() throws Exception {

    DockerfileGitHubUtil dockerfileGitHubUtil = mock(DockerfileGitHubUtil.class);
    GHRepository contentRepo1 = mock(GHRepository.class);
    GHRepository contentRepo2 = mock(GHRepository.class);
    GHRepository contentRepo3 = mock(GHRepository.class);
    GHContent content1 = mock(GHContent.class);
    when(content1.getOwner()).thenReturn(contentRepo1);
    GHContent content2 = mock(GHContent.class);
    when(content2.getOwner()).thenReturn(contentRepo2);
    GHContent content3 = mock(GHContent.class);
    when(content3.getOwner()).thenReturn(contentRepo3);
    PagedSearchIterable<GHContent> contentsWithImage = mock(PagedSearchIterable.class);
    PagedIterator<GHContent> contentsWithImageIterator = mock(PagedIterator.class);
    when(contentsWithImageIterator.hasNext()).thenReturn(true, true, true, false);
    when(contentsWithImageIterator.next()).thenReturn(content1, content2, content3, null);
    when(contentsWithImage.iterator()).thenReturn(contentsWithImageIterator);
    All all = new All();
    all.loadDockerfileGithubUtil(dockerfileGitHubUtil);
    all.forkRepositoriesFound(ArrayListMultimap.create(), ArrayListMultimap.create(), contentsWithImage, "image");
    Mockito.verify(dockerfileGitHubUtil, times(3)).getOrCreateFork(any());
}