### Question:
AmqpSubscriptionTracker { public boolean isActiveDurableSub(String subscriptionName) { return isActiveExclusiveDurableSub(subscriptionName) || isActiveSharedDurableSub(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 testIsActiveDurableSub() { String subscriptionName = "mySubscription"; AmqpSubscriptionTracker tracker1 = new AmqpSubscriptionTracker(); assertFalse(tracker1.isActiveDurableSub(subscriptionName)); JmsConsumerInfo subInfo1 = createConsumerInfo(subscriptionName, "myTopic", false, true, true); tracker1.reserveNextSubscriptionLinkName(subscriptionName, subInfo1); assertTrue(tracker1.isActiveDurableSub(subscriptionName)); assertTrue(tracker1.isActiveExclusiveDurableSub(subscriptionName)); assertFalse(tracker1.isActiveSharedDurableSub(subscriptionName)); tracker1.consumerRemoved(subInfo1); assertFalse(tracker1.isActiveDurableSub(subscriptionName)); assertFalse(tracker1.isActiveExclusiveDurableSub(subscriptionName)); assertFalse(tracker1.isActiveSharedDurableSub(subscriptionName)); AmqpSubscriptionTracker tracker2 = new AmqpSubscriptionTracker(); assertFalse(tracker2.isActiveDurableSub(subscriptionName)); JmsConsumerInfo subInfo2 = createConsumerInfo(subscriptionName, "myTopic", true, true, true); tracker2.reserveNextSubscriptionLinkName(subscriptionName, subInfo2); assertTrue(tracker2.isActiveDurableSub(subscriptionName)); assertFalse(tracker2.isActiveExclusiveDurableSub(subscriptionName)); assertTrue(tracker2.isActiveSharedDurableSub(subscriptionName)); tracker2.consumerRemoved(subInfo2); assertFalse(tracker2.isActiveDurableSub(subscriptionName)); assertFalse(tracker2.isActiveExclusiveDurableSub(subscriptionName)); assertFalse(tracker2.isActiveSharedDurableSub(subscriptionName)); }