Connection connection_2 = JMSUtil.createConnection(InVMConnectorFactory.class.getName());
JMSUtil.createDurableSubscriber(connection_2, topic, clientID, subscriptionName);
Connection connection_3 = JMSUtil.createConnection(InVMConnectorFactory.class.getName());
JMSUtil.createDurableSubscriber(connection_3, topic, clientID+"2", subscriptionName + "2");
TopicControl topicControl = createManagementControl();
String jsonString = topicControl.listDurableSubscriptionsAsJSON();
SubscriptionInfo[] infos = SubscriptionInfo.from(jsonString);
Assert.assertEquals(2, infos.length);
Assert.assertEquals(clientID, infos[0].getClientID());
Assert.assertEquals(subscriptionName, infos[0].getName());
Assert.assertEquals(clientID+"2", infos[1].getClientID());
Assert.assertEquals(subscriptionName + "2", infos[1].getName());
jsonString = topicControl.listNonDurableSubscriptionsAsJSON();
infos = SubscriptionInfo.from(jsonString);
Assert.assertEquals(1, infos.length);
Assert.assertEquals(null, infos[0].getClientID());
Assert.assertEquals(null, infos[0].getName());
jsonString = topicControl.listAllSubscriptionsAsJSON();
infos = SubscriptionInfo.from(jsonString);
Assert.assertEquals(3, infos.length);
connection_1.close();
connection_2.close();