class NotificationCourseAccessManager implements CourseAccessManager {

    Set<Long> removeInvalidContexts(List<Long> subscriberIds) {
        log.debug("removeInvalidContexts started");
        Set<Long> unaccessibleCourseIds = new HashSet<Long>();

        for (Long subscriberId : subscriberIds) {
            List<NotificationSubscriptionContext> notificationCourseAccessTOs = notificationLearnServiceImpl.getNotificationSubscriptionContexts(subscriberId);
            Set<Long> subscribedCourseIds = getSubscribedCourseIds(notificationCourseAccessTOs);
            addUnaccessibleCourseIds(subscribedCourseIds, unaccessibleCourseIds);
            notificationLearnServiceImpl.removePublishers(unaccessibleCourseIds);
        }
        log.debug("removeInvalidContexts finished");
        return unaccessibleCourseIds;
    }

      NotificationCourseAccessManager();

}