class NotificationServiceImpl implements NotificationService {

    @Override
    public void sendImmediatelyReport(Place newPlace) {
        log.info(LogMessage.IN_SEND_IMMEDIATELY_REPORT, newPlace.getName());
        EmailNotification emailNotification = EmailNotification.IMMEDIATELY;
        List<PlaceAuthorDto> subscribers = getSubscribers(emailNotification);

        Map<CategoryDto, List<PlaceNotificationDto>> categoriesDtoWithPlacesDtoMap = new HashMap<>();
        CategoryDto map = modelMapper.map(newPlace.getCategory(), CategoryDto.class);
        List<PlaceNotificationDto> placeDtoList =
            Collections.singletonList(modelMapper.map(newPlace, PlaceNotificationDto.class));
        categoriesDtoWithPlacesDtoMap.put(map, placeDtoList);

        List<PlaceAuthorDto> placeAuthorDto = subscribers.stream()
            .map(o -> modelMapper.map(o, PlaceAuthorDto.class))
            .collect(Collectors.toList());


        rabbitTemplate.convertAndSend(sendEmailTopic, SEND_REPORT_ROUTING_KEY,
            new SendReportEmailMessage(placeAuthorDto, categoriesDtoWithPlacesDtoMap, emailNotification.toString()));
    }

    @Autowired public  NotificationServiceImpl(UserRepo userRepo, PlaceRepo placeRepo,
                                   RabbitTemplate rabbitTemplate,
                                   ModelMapper modelMapper);

}