### Question:
ConfigurationMapper implements DataMapper<Configuration, ConfigurationDto> { @Override public ConfigurationDto mapEntityToDto(Configuration configuration) { ConfigurationDto configurationDto = new ConfigurationDto(); configurationDto.setId(configuration.getId()); configurationDto.setName(configuration.getName()); configurationDto.setValue(configuration.getValue()); configurationDto.setType(configuration.getType()); logger.info("Mapped Configuration (id: )" + configuration.getId() + ") to ConfigurationDto"); return configurationDto; }  @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 mapEntityToDto_expectIdIsMapped() { Long expectedId = 44L; configuration.setId(expectedId); configurationDto = configurationMapper.mapEntityToDto(configuration); Assert.assertEquals(expectedId, configurationDto.getId()); }
@Test public void mapEntityToDto_expectNameIsMapped() { String expectName = "name2"; configuration.setName(expectName); configurationDto = configurationMapper.mapEntityToDto(configuration); Assert.assertEquals(expectName, configurationDto.getName()); }
@Test public void mapEntityToDto_expectValueIsMapped() { String expectedValue = "4.3"; configuration.setValue(expectedValue); configurationDto = configurationMapper.mapEntityToDto(configuration); Assert.assertEquals(expectedValue, configurationDto.getValue()); }
@Test public void mapEntityToDto_expectTypeIsMapped() { String expectedType = "text"; configuration.setType(expectedType); configurationDto = configurationMapper.mapEntityToDto(configuration); Assert.assertEquals(expectedType, configurationDto.getType()); }