public void testUnsubscribe() throws Exception {
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
session.createDurableSubscriber(topic, "SubsId");
session.close();
Destination d = broker.getDestination(topic);
assertEquals("Subscription is missing.", 1, d.getConsumers().size());
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
session.unsubscribe("SubsId");
session.close();
assertEquals("Subscription exists.", 0, d.getConsumers().size());
}