### Question:
FrontendLogMapper implements DataMapper<FrontendLog, FrontendLogDto> { @Override public Collection<FrontendLogDto> mapEntitiesToDtos(Collection<FrontendLog> frontendLogs) { Collection<FrontendLogDto> mappedFrontendLog = new ArrayList<>(); frontendLogs.forEach(frontendLog -> mappedFrontendLog.add(mapEntityToDto(frontendLog))); return mappedFrontendLog; }  @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_mapEntitiesToDtosShouldMapCorrectly() { FrontendLog frontendLog1 = new FrontendLog(1L, "ERROR", LocalDateTime.now(), "main.ts", "5", "Failed to build file"); FrontendLog frontendLog2 = new FrontendLog(2L, "DEBUG", LocalDateTime.now(), "main.ts", "4", "Joining new entry"); Collection<FrontendLog> frontendLogs = Arrays.asList(frontendLog1, frontendLog2); Collection<FrontendLogDto> frontendLogDtos = frontendLogMapper.mapEntitiesToDtos(frontendLogs); Assert.assertEquals(frontendLogs.size(), frontendLogDtos.size()); assertFrontendLogWithDto(frontendLog1, (FrontendLogDto) frontendLogDtos.toArray()[0]); assertFrontendLogWithDto(frontendLog2, (FrontendLogDto) frontendLogDtos.toArray()[1]); }