class CinemaResponseToCinema {

    public List<Cinema> map(CinemaResponse cinemaResponse) {
        List<Cinema> cinemas = new ArrayList<>();
        if (cinemaResponse.getCinemas() != null){
            for (int i = 0; i < cinemaResponse.getCinemas().size(); i++){
                final Cinema cinema = new Cinema();
                final CinemaNetwork response = cinemaResponse.getCinemas().get(i);
                cinema.setPage(cinemaResponse.getPage());
                cinema.setTotalPages(cinemaResponse.getTotalPages());
                cinema.setTotalResults(cinemaResponse.getTotalResults());
                cinema.setId(response.getId());
                cinema.setVoteAverage(response.getVoteAverage());
                cinema.setTitle(response.getTitle());
                cinema.setAdult(response.isAdult());
                cinema.setDescription(response.getDescription());
                cinema.setPosterUrl(response.getPosterUrl());
                cinema.setReleaseDate(response.getReleaseDate());
                cinema.setPopularity(response.getPopularity());
                cinema.setGenres(response.getGenreIds());
                cinemas.add(cinema);
            }
        }
        return cinemas;
    }

}

class CinemaResponseToCinemaTest  {

    @Mock private CinemaDetailResponse cinemaDetailResponseMock;
    @Mock private CinemaResponse cinemaResponseMock;
    @Mock private List<CinemaNetwork> cinemaNetworkListMock;
    @Mock private Iterator<CinemaNetwork> cinemaNetworkIteratorMock;
    private CinemaResponseToCinema mapper;

    @Test
    public void shouldMapId(){

        doReturn(77).when(cinemaDetailResponseMock).getId();

        final Cinema cinema = mapper.map(cinemaDetailResponseMock);
        assertThat(cinema.getId() , is(cinemaDetailResponseMock.getId()));
    }

}