CinemaEntityToCinema extends Mapper<Cinema, CinemaEntity> { @Override public CinemaEntity map(final Cinema cinema) { final CinemaEntity cinemaEntity = new CinemaEntity(); fillCinemaEntity(cinemaEntity , cinema); return cinemaEntity; }  @Override CinemaEntity map(final Cinema cinema); @Override Cinema reverseMap(final CinemaEntity cinemaEntity); Cinema mapCinemaDetail(CinemaEntity cinemaEntity , List<ActorEntity> actorEntities); List<ActorEntity> mapActors(List<Actor> actors);  }
@Test public void testMap() { doReturn(62).when(cinemaMock).getId(); doReturn("Star wars").when(cinemaMock).getTitle(); doReturn("Best movie").when(cinemaMock).getDescription(); doReturn(200000000).when(cinemaMock).getBudget(); final CinemaEntity cinemaEntity = mapper.map(cinemaMock); assertThat(cinemaEntity.getCinemaId() , is(62)); assertThat(cinemaEntity.getTitle() , is("Star wars")); assertThat(cinemaEntity.getDescription() , is("Best movie")); assertThat(cinemaEntity.getBudget() , is(200000000)); }