@Test public void shouldMapId() { when(responseDetailMock.getId()).thenReturn(22); Actor actor = mapper.map(responseDetailMock); assertThat(actor.getActorId() , is(22)); }
public Actor map(ActorDetailResponse response){ Actor actor = new Actor(); actor.setActorId(response.getId()); actor.setProfileUrl(response.getProfilePath()); actor.setName(response.getName()); actor.setBiography(response.getBiography()); actor.setDeathDay((String) response.getDeathday()); actor.setPlaceOfBirth(defaultValueIfNull(response.getPlaceOfBirth())); actor.setPopularity(response.getPopularity()); checkAgeThenSet(response , actor); setCinemas(response , actor); setPosters(response , actor); setBackgroundPosters(response , actor); return actor; }
ActorDetailResponseToActor { public Actor map(ActorDetailResponse response){ Actor actor = new Actor(); actor.setActorId(response.getId()); actor.setProfileUrl(response.getProfilePath()); actor.setName(response.getName()); actor.setBiography(response.getBiography()); actor.setDeathDay((String) response.getDeathday()); actor.setPlaceOfBirth(defaultValueIfNull(response.getPlaceOfBirth())); actor.setPopularity(response.getPopularity()); checkAgeThenSet(response , actor); setCinemas(response , actor); setPosters(response , actor); setBackgroundPosters(response , actor); return actor; } }
ActorDetailResponseToActor { public Actor map(ActorDetailResponse response){ Actor actor = new Actor(); actor.setActorId(response.getId()); actor.setProfileUrl(response.getProfilePath()); actor.setName(response.getName()); actor.setBiography(response.getBiography()); actor.setDeathDay((String) response.getDeathday()); actor.setPlaceOfBirth(defaultValueIfNull(response.getPlaceOfBirth())); actor.setPopularity(response.getPopularity()); checkAgeThenSet(response , actor); setCinemas(response , actor); setPosters(response , actor); setBackgroundPosters(response , actor); return actor; }  }
ActorDetailResponseToActor { public Actor map(ActorDetailResponse response){ Actor actor = new Actor(); actor.setActorId(response.getId()); actor.setProfileUrl(response.getProfilePath()); actor.setName(response.getName()); actor.setBiography(response.getBiography()); actor.setDeathDay((String) response.getDeathday()); actor.setPlaceOfBirth(defaultValueIfNull(response.getPlaceOfBirth())); actor.setPopularity(response.getPopularity()); checkAgeThenSet(response , actor); setCinemas(response , actor); setPosters(response , actor); setBackgroundPosters(response , actor); return actor; }  Actor map(ActorDetailResponse response); List<Actor> map(ActorResponse response); }
ActorDetailResponseToActor { public Actor map(ActorDetailResponse response){ Actor actor = new Actor(); actor.setActorId(response.getId()); actor.setProfileUrl(response.getProfilePath()); actor.setName(response.getName()); actor.setBiography(response.getBiography()); actor.setDeathDay((String) response.getDeathday()); actor.setPlaceOfBirth(defaultValueIfNull(response.getPlaceOfBirth())); actor.setPopularity(response.getPopularity()); checkAgeThenSet(response , actor); setCinemas(response , actor); setPosters(response , actor); setBackgroundPosters(response , actor); return actor; }  Actor map(ActorDetailResponse response); List<Actor> map(ActorResponse response);  }