### Question:
KinoDtoBuilder { public KinoDto build(LocalKino localKino) { Long tmdbId = null; String posterPath = null; String overview = null; int year = 0; String releaseDate = null; TmdbKino kino = localKino.getKino(); if (kino != null) { tmdbId = kino.getMovie_id(); posterPath = kino.getPoster_path(); overview = kino.getOverview(); year = kino.getYear(); releaseDate = kino.getRelease_date(); } return new KinoDto( localKino.getId(), tmdbId, localKino.getTitle(), localKino.getReview_date(), localKino.getReview(), localKino.getRating(), localKino.getMaxRating(), posterPath, overview, year, releaseDate ); }  KinoDto build(LocalKino localKino);  }### Answer:
@Test public void build() throws Exception { doReturn(2015).when(tmdbKino).getYear(); doReturn("a path").when(tmdbKino).getPoster_path(); doReturn(24L).when(tmdbKino).getMovie_id(); doReturn("an horrible overview").when(tmdbKino).getOverview(); doReturn("1956/12/12").when(tmdbKino).getRelease_date(); doReturn(tmdbKino).when(localKino).getKino(); doReturn(4L).when(localKino).getId(); doReturn(4.5f).when(localKino).getRating(); doReturn(10).when(localKino).getMaxRating(); doReturn("a superb review").when(localKino).getReview(); doReturn("what a title").when(localKino).getTitle(); Date reviewDate = new Date(); doReturn(reviewDate).when(localKino).getReview_date(); assertEquals( new KinoDto( 4L, 24L, "what a title", reviewDate, "a superb review", 4.5f, 10, "a path", "an horrible overview", 2015, "1956/12/12" ), new KinoDtoBuilder().build(localKino) ); }