@Test
public void testCollectContributors() throws Exception {

    // given
    RepositoryWrapper repo1 = mock(RepositoryWrapper.class);
    Contributor c1 = newContributor(11, 22, "http://a.com", 33);
    when(repo1.listContributors()).thenReturn(asList(c1));
    RepositoryWrapper repo2 = mock(RepositoryWrapper.class);
    Contributor c2 = newContributor(44, 55, "http://b.com", 66);
    when(repo2.listContributors()).thenReturn(asList(c2));
    List<org.zalando.catwatch.backend.model.Contributor> contributors =
            new ArrayList<>(
                    task.collectContributors(org(asList(repo1, repo2))));
    assertThat(contributors, hasSize(2));
    org.zalando.catwatch.backend.model.Contributor c1_ = contributors.get(0);
    assertThat(c1_.getId(), equalTo(11L));
    assertThat(c1_.getOrganizationalCommitsCount(), equalTo(22));
    assertThat(c1_.getUrl(), equalTo("http://a.com"));
    org.zalando.catwatch.backend.model.Contributor c2_ = contributors.get(1);
    assertThat(c2_.getId(), equalTo(44L));
    assertThat(c2_.getOrganizationalCommitsCount(), equalTo(55));
    assertThat(c2_.getUrl(), equalTo("http://b.com"));
}