Message m = session.createTextMessage("A");
producer.send(m);
// make sure we can browse it
QueueBrowser browser = session.createBrowser(HornetQServerTestCase.queue1);
Enumeration en = browser.getEnumeration();
ProxyAssertSupport.assertTrue(en.hasMoreElements());
TextMessage rm = (TextMessage)en.nextElement();
ProxyAssertSupport.assertNotNull(rm);
ProxyAssertSupport.assertEquals("A", rm.getText());
ProxyAssertSupport.assertFalse(en.hasMoreElements());
// create a *new* enumeration, that should reset it
en = browser.getEnumeration();
ProxyAssertSupport.assertTrue(en.hasMoreElements());
rm = (TextMessage)en.nextElement();