diff --git a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionRegistryTest.java b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionRegistryTest.java index 79dd2c74b84..1eb02b8daf4 100644 --- a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionRegistryTest.java +++ b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionRegistryTest.java @@ -54,4 +54,14 @@ public class SubscriptionRegistryTest extends BaseSubscriptionRegistryTest { assertFalse(newActiveSubscription == origActiveSubscription); } + @Test + public void updateRemove() { + Subscription subscription = createSubscription(); + assertRegistrySize(0); + mySubscriptionRegistry.registerSubscriptionUnlessAlreadyRegistered(subscription); + assertRegistrySize(1); + mySubscriptionRegistry.unregisterSubscription(subscription.getId()); + assertRegistrySize(0); + } + }