### Question:
CsvImporter { @SuppressWarnings("WeakerAccess") public void importCsvFile(String importFilename) throws ImportException { FileReader fileReader; try { fileReader = fileReaderGetter.get(importFilename); } catch (IOException e) { throw new ImportException(context.getString(R.string.import_io_error_toast, importFilename), e); } List<Dto> kinos = dtoImportCreator.getKinos(fileReader); dataService.createOrUpdateWithTmdbId(kinos); } CsvImporter(FileReaderGetter fileReaderGetter, DtoImportCreator<Dto> dtoImportCreator, DataService<Dto> dataService, Context context); @SuppressWarnings("WeakerAccess") void importCsvFile(String importFilename);  }### Answer:
@Test public void importCsvFile() throws Exception { doReturn(fileReader).when(fileReaderGetter).get("import.csv"); doReturn(new ArrayList<KinoDto>() {{ add(aLocalKino); add(anotherLocalKino); }}).when(dtoImportCreator).getKinos(fileReader); new CsvImporter(fileReaderGetter, dtoImportCreator, kinoService, context).importCsvFile("import.csv"); verify(kinoService).createOrUpdateWithTmdbId(new ArrayList<KinoDto>() {{ add(aLocalKino); add(anotherLocalKino); }}); }