### Question:
UserSettingsMapper implements DataMapper<UserSettings, UserSettingsDto> { @Override public Collection<UserSettingsDto> mapEntitiesToDtos(Collection<UserSettings> input) { Collection<UserSettingsDto> dtos = new ArrayList<UserSettingsDto>(); input.forEach(entity -> dtos.add(mapEntityToDto(entity))); return dtos; }  @Override UserSettings mapDtoToEntity(UserSettingsDto dto); @Override UserSettingsDto mapEntityToDto(UserSettings entity); @Override Collection<UserSettings> mapDtosToEntities(Collection<UserSettingsDto> input); @Override Collection<UserSettingsDto> mapEntitiesToDtos(Collection<UserSettings> input);  }### Answer:
@Test public void test_mapEntitiesToDtos_ExpectEmptyList() { Collection<UserSettings> entities = new ArrayList<>(); Collection<UserSettingsDto> dtos = this.mapper.mapEntitiesToDtos(entities); Assert.assertTrue(dtos.isEmpty()); }
@Test public void test_mapEntitiesToDtos_ExpectListIsMappedWithTwoElements() { Collection<UserSettings> entities = Arrays.asList(new UserSettings(), new UserSettings()); Collection<UserSettingsDto> dtos = mapper.mapEntitiesToDtos(entities); Assert.assertEquals(2, dtos.size()); }