ServerManagement.undeployTopic("TopicMessageList");
   public void testListMessagesEmptySelector() throws Exception   {      InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment());      TopicConnectionFactory cf = (JBossConnectionFactory)ic.lookup("/ConnectionFactory");      ServerManagement.deployTopic("TopicMessageList2");      Topic topic = (Topic)ic.lookup("/topic/TopicMessageList2");      TopicConnection conn = cf.createTopicConnection();      conn.setClientID("Client1");      TopicSession s = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);      s.createDurableSubscriber(topic, "SubscriberA");      ObjectName topicON =         new ObjectName("jboss.messaging.destination:service=Topic,name=TopicMessageList2");      List messages = (List)ServerManagement.invoke(topicON,            "listMessagesDurableSub",            new Object[] {"SubscriberA", "Client1", ""},            new String[] {"java.lang.String", "java.lang.String", "java.lang.String"});      assertTrue(messages.isEmpty());            messages = (List)ServerManagement.invoke(topicON,            "listMessagesDurableSub",            new Object[] {"SubscriberA", "Client1", "                   "},            new String[] {"java.lang.String", "java.lang.String", "java.lang.String"});      assertTrue(messages.isEmpty());      // Clean-up      conn.close();      ServerManagement.undeployTopic("TopicMessageList2");   }