class NotificationServiceImpl extends CoreBaseService<NotificationServiceMetric<NotificationServiceContext>, NotificationServiceContext> implements
        NotificationService {

    @Override
    public Subscription subscribe(NotificationSubscriptionContext subscriptionContext) {
        if (isSubscribed(subscriptionContext)) {
            return subscriptionDelegate.getSubscription(subscriptionContext);
        } else {
            return subscriptionDelegate.createAndSaveSubscription(subscriptionContext);
        }
    }

}