@Test public void deleteNotExistSubscriptions() throws URISyntaxException, SubscriptionException, SubscriptionPersistenceException { UnsubscribeContext unsubscribeContext = new UnsubscribeContext("12345"); assertFalse(subscriptions.deleteSubscription(unsubscribeContext)); }
public boolean deleteSubscription(UnsubscribeContext unsubscribeContext) throws SubscriptionPersistenceException { String subscriptionId = unsubscribeContext.getSubscriptionId(); subscriptionsRepository.removeSubscription(subscriptionId); Subscription subscription = subscriptions.remove(subscriptionId); return (subscription != null); }
Subscriptions { public boolean deleteSubscription(UnsubscribeContext unsubscribeContext) throws SubscriptionPersistenceException { String subscriptionId = unsubscribeContext.getSubscriptionId(); subscriptionsRepository.removeSubscription(subscriptionId); Subscription subscription = subscriptions.remove(subscriptionId); return (subscription != null); } }
Subscriptions { public boolean deleteSubscription(UnsubscribeContext unsubscribeContext) throws SubscriptionPersistenceException { String subscriptionId = unsubscribeContext.getSubscriptionId(); subscriptionsRepository.removeSubscription(subscriptionId); Subscription subscription = subscriptions.remove(subscriptionId); return (subscription != null); }  }
Subscriptions { public boolean deleteSubscription(UnsubscribeContext unsubscribeContext) throws SubscriptionPersistenceException { String subscriptionId = unsubscribeContext.getSubscriptionId(); subscriptionsRepository.removeSubscription(subscriptionId); Subscription subscription = subscriptions.remove(subscriptionId); return (subscription != null); }  String addSubscription(SubscribeContext subscribeContext); boolean deleteSubscription(UnsubscribeContext unsubscribeContext); Iterator<Subscription> findSubscriptions(EntityId searchEntityId, Set<String> searchAttributes); @Scheduled(fixedDelay = 60000) void purgeExpiredSubscriptions(); Subscription getSubscription(String subscriptionId); }
Subscriptions { public boolean deleteSubscription(UnsubscribeContext unsubscribeContext) throws SubscriptionPersistenceException { String subscriptionId = unsubscribeContext.getSubscriptionId(); subscriptionsRepository.removeSubscription(subscriptionId); Subscription subscription = subscriptions.remove(subscriptionId); return (subscription != null); }  String addSubscription(SubscribeContext subscribeContext); boolean deleteSubscription(UnsubscribeContext unsubscribeContext); Iterator<Subscription> findSubscriptions(EntityId searchEntityId, Set<String> searchAttributes); @Scheduled(fixedDelay = 60000) void purgeExpiredSubscriptions(); Subscription getSubscription(String subscriptionId);  }