log.info("Set message listener2");
log.trace("Set message listener2");
   public void testSetMessageListenerTwice() throws Exception   {      if (log.isTraceEnabled()) log.trace("testSetMessageListenerTwice");      MessageListenerImpl listener1 = new MessageListenerImpl();            topicConsumer.setMessageListener(listener1);      log.info("Set message listener1");      MessageListenerImpl listener2 = new MessageListenerImpl();            topicConsumer.setMessageListener(listener2);      log.info("Set message listener2");      consumerConnection.start();      Message m1 = producerSession.createMessage();      topicProducer.send(m1);      // block the current thread until the listener gets something; this is to avoid closing      // connection too early      //log.info("Waiting for messages....");            listener2.waitForMessages();      assertEquals(m1.getJMSMessageID(), listener2.getNextMessage().getJMSMessageID());      assertEquals(0, listener1.size());   }