### Question:
ForgotPasswordMapper implements DataMapper<ForgotPassword, ForgotPasswordDto> { @Override public Collection<ForgotPassword> mapDtosToEntities(Collection<ForgotPasswordDto> input) { return input.stream() .map(this::mapDtoToEntity) .collect(Collectors.toCollection(ArrayList::new)); }  @Override ForgotPassword mapDtoToEntity(ForgotPasswordDto input); @Override ForgotPasswordDto mapEntityToDto(ForgotPassword input); @Override Collection<ForgotPassword> mapDtosToEntities(Collection<ForgotPasswordDto> input); @Override Collection<ForgotPasswordDto> mapEntitiesToDtos(Collection<ForgotPassword> input);  }### Answer:
@Test public void mapDtosToEntities_expectAllMapped() { ForgotPasswordDto forgotPasswordDto1 = new ForgotPasswordDto(); forgotPasswordDto1.setEmail("test1@example.com"); ForgotPasswordDto forgotPasswordDto2 = new ForgotPasswordDto(); forgotPasswordDto2.setEmail("test2@example.com"); ArrayList<ForgotPasswordDto> forgotPasswordDtos = new ArrayList<>(2); forgotPasswordDtos.add(forgotPasswordDto1); forgotPasswordDtos.add(forgotPasswordDto2); ArrayList<ForgotPassword> forgotPasswords = (ArrayList<ForgotPassword>) forgotPasswordMapper.mapDtosToEntities(forgotPasswordDtos); assertThat(forgotPasswordDtos, hasSize(2)); assertEquals(forgotPasswordDtos.size(), forgotPasswords.size()); for (int i = 0; i < forgotPasswordDtos.size(); i++) { assertMapped(forgotPasswordDtos.get(i), forgotPasswords.get(i)); } }