### Question:
FrontendLogMapper implements DataMapper<FrontendLog, FrontendLogDto> { @Override public FrontendLog mapDtoToEntity(FrontendLogDto frontendLogDto) { FrontendLog frontendLog = new FrontendLog(); frontendLog.setId(frontendLogDto.getId()); frontendLog.setLevel(FrontendLogLevel.getLevelByIdentifier(frontendLogDto.getLevel()).name()); frontendLog.setTimestamp( LocalDateTime.parse( formatStringToValidIsoWithoutMilliseconds(frontendLogDto.getTimestamp()), dateTimeFormatter)); frontendLog.setFileName(frontendLogDto.getFileName()); frontendLog.setLineNumber(frontendLogDto.getLineNumber()); frontendLog.setMessage(frontendLogDto.getMessage()); return frontendLog; }  @Override FrontendLog mapDtoToEntity(FrontendLogDto frontendLogDto); @Override FrontendLogDto mapEntityToDto(FrontendLog frontendLog); @Override Collection<FrontendLog> mapDtosToEntities(Collection<FrontendLogDto> input); @Override Collection<FrontendLogDto> mapEntitiesToDtos(Collection<FrontendLog> frontendLogs);  }### Answer:
@Test public void test_mapDtoToEntityShouldMapCorrectly() { frontendLogDto.setId(1L); frontendLogDto.setLevel(String.valueOf(FrontendLogLevel.INFO.getLevelId())); frontendLogDto.setTimestamp("2019-11-21T09:35:05"); frontendLogDto.setFileName("main.ts"); frontendLogDto.setLineNumber("1"); frontendLogDto.setMessage("Test message"); frontendLog = frontendLogMapper.mapDtoToEntity(frontendLogDto); assertFrontendLogWithDto(frontendLog, frontendLogDto); }