### Question:
ChangePasswordMapper implements DataMapper<ChangePasswordData, ChangePasswordDto> { @Override public Collection<ChangePasswordDto> mapEntitiesToDtos( Collection<ChangePasswordData> changePasswordDataSets) { Collection<ChangePasswordDto> changePasswordDtos = new ArrayList<>(); for (ChangePasswordData changePasswordData : changePasswordDataSets) { ChangePasswordDto changePasswordDto = mapEntityToDto(changePasswordData); changePasswordDtos.add(changePasswordDto); } return changePasswordDtos; }  @Override ChangePasswordData mapDtoToEntity(ChangePasswordDto changePasswordDto); @Override ChangePasswordDto mapEntityToDto(ChangePasswordData changePasswordData); @Override Collection<ChangePasswordData> mapDtosToEntities(Collection<ChangePasswordDto> input); @Override Collection<ChangePasswordDto> mapEntitiesToDtos(
      Collection<ChangePasswordData> changePasswordDataSets);  }### Answer:
@Test public void mapEntitysToDtos_expectAllMapped() { ArrayList<ChangePasswordData> dataList = new ArrayList<>(); ChangePasswordData changePasswordData1 = new ChangePasswordData(); changePasswordData1.setNewPassword("newPassword1"); changePasswordData1.setOldPassword("oldPassword1"); changePasswordData1.setEmail("e@mail1"); ChangePasswordData changePasswordData2 = new ChangePasswordData(); changePasswordData2.setNewPassword("newPassword2"); changePasswordData2.setOldPassword("oldPassword2"); changePasswordData2.setEmail("e@mail2"); ChangePasswordData changePasswordData3 = new ChangePasswordData(); changePasswordData3.setNewPassword("newPassword3"); changePasswordData3.setOldPassword("oldPassword3"); changePasswordData3.setEmail("e@mail3"); ArrayList<ChangePasswordDto> dtoList = (ArrayList<ChangePasswordDto>) this.changePasswordMapper.mapEntitiesToDtos(dataList); for (int i = 0; i < dataList.size(); i++) { assertEnitityMappedCorrectly(dtoList.get(i), dataList.get(i)); } }
@Test public void mapEntitysToDtos_expectOutputToBeEmpty() { ArrayList<ChangePasswordData> dataList = new ArrayList<>(); ArrayList<ChangePasswordDto> dtoList = (ArrayList<ChangePasswordDto>) this.changePasswordMapper.mapEntitiesToDtos(dataList); assertTrue(dtoList.isEmpty()); }