### Question:
ConfigurationMapper implements DataMapper<Configuration, ConfigurationDto> { @Override public Collection<ConfigurationDto> mapEntitiesToDtos(Collection<Configuration> configurations) { Collection<ConfigurationDto> configurationDtos = new ArrayList<>(); for (Configuration configuration : configurations) { ConfigurationDto configurationDto = mapEntityToDto(configuration); configurationDtos.add(configurationDto); } return configurationDtos; }  @Override Configuration mapDtoToEntity(ConfigurationDto configurationDto); @Override ConfigurationDto mapEntityToDto(Configuration configuration); @Override Collection<Configuration> mapDtosToEntities(Collection<ConfigurationDto> input); @Override Collection<ConfigurationDto> mapEntitiesToDtos(Collection<Configuration> configurations);  }### Answer:
@Test public void mapEntitiesToDtos_expectEmptyList() { Collection<Configuration> configurations = new ArrayList<>(); Collection<ConfigurationDto> configurationDtos = configurationMapper.mapEntitiesToDtos(configurations); Assert.assertTrue(configurationDtos.isEmpty()); }
@Test public void mapEntitiesToDtos_expectListWithTwoElements() { Collection<Configuration> configurations = Arrays.asList(new Configuration(), new Configuration()); Collection<ConfigurationDto> configurationDtos = configurationMapper.mapEntitiesToDtos(configurations); Assert.assertEquals(configurations.size(), configurationDtos.size()); }