### Question:
AmqpSubscriptionTracker { public boolean isActiveSharedDurableSub(String subscriptionName) { return sharedDurableSubs.containsKey(subscriptionName); }  String reserveNextSubscriptionLinkName(String subscriptionName, JmsConsumerInfo consumerInfo); String getFirstDurableSubscriptionLinkName(String subscriptionName, boolean hasClientID); boolean isActiveExclusiveDurableSub(String subscriptionName); boolean isActiveSharedDurableSub(String subscriptionName); boolean isActiveDurableSub(String subscriptionName); boolean isActiveSharedVolatileSub(String subscriptionName); void consumerRemoved(JmsConsumerInfo consumerInfo);  }### Answer:
@Test public void testIsActiveSharedDurableSub() { String subscriptionName1 = "mySubscription"; AmqpSubscriptionTracker tracker = new AmqpSubscriptionTracker(); assertFalse(tracker.isActiveSharedDurableSub(subscriptionName1)); JmsConsumerInfo subInfo = createConsumerInfo(subscriptionName1, "myTopic", true, true, true); tracker.reserveNextSubscriptionLinkName(subscriptionName1, subInfo); assertTrue(tracker.isActiveSharedDurableSub(subscriptionName1)); tracker.consumerRemoved(subInfo); assertFalse(tracker.isActiveSharedDurableSub(subscriptionName1)); }