class EcoNewsServiceImpl implements EcoNewsService {

    @Override
    public List<EcoNewsDto> getThreeRecommendedEcoNews(Long openedEcoNewsId) {
        List<EcoNews> ecoNewsList = ecoNewsRepo.getThreeRecommendedEcoNews(openedEcoNewsId);
        return ecoNewsList
                .stream()
                .map(ecoNews -> modelMapper.map(ecoNews, EcoNewsDto.class))
                .collect(Collectors.toList());
    }

}