### Question:
FrontendLogMapper implements DataMapper<FrontendLog, FrontendLogDto> { @Override public FrontendLogDto mapEntityToDto(FrontendLog frontendLog) { FrontendLogDto frontendLogDto = new FrontendLogDto(); frontendLogDto.setId(frontendLog.getId()); frontendLogDto.setLevel( String.valueOf(FrontendLogLevel.valueOf(frontendLog.getLevel()).getLevelId())); frontendLogDto.setTimestamp(frontendLog.getTimestamp().format(dateTimeFormatter)); frontendLogDto.setFileName(frontendLog.getFileName()); frontendLogDto.setLineNumber(frontendLog.getLineNumber()); frontendLogDto.setMessage(frontendLog.getMessage()); return frontendLogDto; }  @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_mapEntityToDtoShouldMapCorrectly() { frontendLog.setId(1L); frontendLog.setLevel(FrontendLogLevel.INFO.name()); frontendLog.setTimestamp(LocalDateTime.now()); frontendLog.setFileName("main.ts"); frontendLog.setLineNumber("1"); frontendLog.setMessage("Test message"); frontendLogDto = frontendLogMapper.mapEntityToDto(frontendLog); assertFrontendLogWithDto(frontendLog, frontendLogDto); }