### Question:
MovieCsvExportWriter extends CsvExportWriter<KinoDto> { public void write(KinoDto kinoDto) throws IOException { @SuppressLint("SimpleDateFormat") SimpleDateFormat simpleDateFormat = new SimpleDateFormat(); csvPrinterWrapper.printRecord( kinoDto.getKinoId(), kinoDto.getTmdbKinoId(), kinoDto.getTitle(), kinoDto.getOverview(), kinoDto.getYear(), kinoDto.getPosterPath(), kinoDto.getRating(), kinoDto.getReleaseDate(), kinoDto.getReview(), kinoDto.getReview_date() != null ? simpleDateFormat.format(kinoDto.getReview_date()) : null, kinoDto.getMaxRating() ); } MovieCsvExportWriter(Appendable out);   MovieCsvExportWriter(CSVPrinterWrapper csvPrinterWrapper); void write(KinoDto kinoDto);  }### Answer:
@Test public void write() throws Exception { Date aDate = new Date(); aKino = new KinoDto( 24L, 25L, "a title", aDate, "a review", 2.4f, 5, "/path", "an overview", 1984, "2012" ); new MovieCsvExportWriter(csvPrinterWrapper).write(aKino); verify(csvPrinterWrapper).printRecord( 24L, 25L, "a title", "an overview", 1984, "/path", 2.4f, "2012", "a review", new SimpleDateFormat().format(aDate), 5 ); }
@Test public void writeNullReviewDate() throws Exception { aKino = new KinoDto( 24L, 25L, "a title", null, "a review", 2.4f, 5, "/path", "an overview", 1984, "2012" ); new MovieCsvExportWriter(csvPrinterWrapper).write(aKino); verify(csvPrinterWrapper).printRecord( 24L, 25L, "a title", "an overview", 1984, "/path", 2.4f, "2012", "a review", null, 5 ); }