class DoiExpiryServiceImpl extends BaseTransactionalService implements DoiExpiryService {

    @Override
    @Transactional
    public void notifyExpiredDoi() {
        ZonedDateTime expiry = Profile.startOfCurrentFinancialYear(ZonedDateTime.now()).atStartOfDay(ZoneId.systemDefault());

        Page<User> expired = affiliationRepository.findUserToBeNotifiedOfExpiry(expiry, PageRequest.of(0, 1));

        expired.getContent().stream().findFirst().ifPresent(this::notifyExpiry);

    }

    public  DoiExpiryServiceImpl(AffiliationRepository affiliationRepository,
                                ProfileRepository profileRepository,
                                NotificationService notificationService,
                                SystemNotificationSource systemNotificationSource,
                                @Value("${ifs.web.baseURL}") String webBaseUrl);

}