SubscriptionDelegate { @Deprecated void deleteSubscription(NotificationSubscriptionContext subscriptionContext) { Publisher publisher = getPublisher(subscriptionContext); Subscriber subscriber = getSubscriber(subscriptionContext.getIdentity()); Subscription subscription = subscriptionDao.getSubscription(subscriber, publisher); subscriptionDao.deleteSubscription(subscription); }  void invalidateSubscriptionForSubscriptionContext(NotificationSubscriptionContext subscriptionContext); void invalidateSubscription(Publisher publisher, Subscriber subscriber); void invalidateSubscription(Subscription subscription); Subscription getSubscription(NotificationSubscriptionContext subscriptionContext); Subscription createAndSaveSubscription(NotificationSubscriptionContext subscriptionContext); List<Subscription> getSubscriptions(Identity identity);  }
@Test public void deleteSubscription() { when(subscriptionDelegateTestObject.subscriptionDao.getSubscription(subscriber, publisher)).thenReturn(subscription); subscriptionDelegateTestObject.deleteSubscription(subscriptionContext); verify(subscriptionDelegateTestObject.subscriptionDao).deleteSubscription(subscription); }