@Test
public void initializeViewWithData()
        throws Exception {

    // given
    List<GithubRepo> repositories = new ArrayList<GithubRepo>() {{
        add(new GithubRepo());
    }};
    repositoriesPresenter.repositories = repositories;
    repositoriesPresenter.downloadedAll = true;
    repositoriesPresenter.isDownloading = false;
    repositoriesPresenter.currentPage = 2;
    repositoriesPresenter.getRepositoriesInteractor = getRepositoriesInteractor;
    repositoriesPresenter.githubRepoRepository = githubRepoRepository;
    // when
    repositoriesPresenter.attachView(viewContract);
    // then
    assertThat(repositoriesPresenter.isDownloading).isFalse();
    Mockito.verify(getRepositoriesInteractor, Mockito.never()).getRepositories(RepositoriesPresenter.REPO_NAME, 2);
    Mockito.verify(viewContract).updateRepositories(repositories);
}