### Question:
NotificationServiceImpl implements NotificationService { @Scheduled(cron = "0 0 12 1 * ?", zone = AppConstant.UKRAINE_TIMEZONE) @Override public void sendMonthlyReport() { log.info(LogMessage.IN_SEND_MONTHLY_REPORT, LocalDateTime.now(ZONE_ID)); LocalDateTime startDate = LocalDateTime.now(ZONE_ID).minusMonths(1); sendReport(EmailNotification.MONTHLY, startDate); } @Autowired  NotificationServiceImpl(UserRepo userRepo, PlaceRepo placeRepo,
                                   RabbitTemplate rabbitTemplate,
                                   ModelMapper modelMapper); @Override void sendImmediatelyReport(Place newPlace); @Scheduled(cron = "0 0 12 ? * *", zone = AppConstant.UKRAINE_TIMEZONE) @Override void sendDailyReport(); @Scheduled(cron = "0 0 12 ? * MON", zone = AppConstant.UKRAINE_TIMEZONE) @Override void sendWeeklyReport(); @Scheduled(cron = "0 0 12 1 * ?", zone = AppConstant.UKRAINE_TIMEZONE) @Override void sendMonthlyReport();  }### Answer:
@Test void sendMonthlyReportTest() { EmailNotification emailNotification = EmailNotification.MONTHLY; Category category = ModelUtils.getCategory(); User user = ModelUtils.getUser(); user.setEmailNotification(emailNotification); Place testPlace1 = ModelUtils.getPlace(); testPlace1.setCategory(category); testPlace1.setId(1L); Place testPlace2 = ModelUtils.getPlace(); testPlace1.setCategory(category); testPlace1.setId(2L); List<Place> testPlaces = Arrays.asList(testPlace1, testPlace2); when(userRepo.findAllByEmailNotification(emailNotification)) .thenReturn(Collections.singletonList(user)); when(modelMapper.map(user, PlaceAuthorDto.class)) .thenReturn(new PlaceAuthorDto(1L, "dto", "email")); when(placeRepo.findAllByModifiedDateBetweenAndStatus(any(LocalDateTime.class), any(LocalDateTime.class), any())) .thenReturn(testPlaces); when(modelMapper.map(testPlace1, PlaceNotificationDto.class)) .thenReturn(new PlaceNotificationDto("name", new CategoryDto("category"))); when(modelMapper.map(testPlace2, PlaceNotificationDto.class)) .thenReturn(new PlaceNotificationDto("name1", new CategoryDto("category1"))); when(modelMapper.map(testPlace1.getCategory(), CategoryDto.class)) .thenReturn(new CategoryDto("category")); when(modelMapper.map(testPlace2.getCategory(), CategoryDto.class)) .thenReturn(new CategoryDto("category1")); notificationService.sendMonthlyReport(); verify(rabbitTemplate, Mockito.times(1)) .convertAndSend(any(), anyString(), any(SendReportEmailMessage.class)); }