class RepoListMapper implements Func1<List<RepositoryDTO>, List<Repository>> {

    @Override
    public List<Repository> call(List<RepositoryDTO> repositoryDTOs) {
        if (repositoryDTOs == null) {
            return null;
        }
        List<Repository> repoList = Observable.from(repositoryDTOs)
                .map(repoDTO -> new Repository(repoDTO.getName(), repoDTO.getOwner().getLogin()))
                .toList()
                .toBlocking()
                .first();
        return repoList;
    }

    @Inject public  RepoListMapper();

}