public void testReference() throws Exception
{
HornetQDestination queue = (HornetQDestination) HornetQJMSClient.createQueue(RandomUtil.randomString());
Reference reference = queue.getReference();
DestinationObjectFactory factory = new DestinationObjectFactory();
Object object = factory.getObjectInstance(reference, null, null, null);
Assert.assertNotNull(object);
Assert.assertTrue(object instanceof HornetQDestination);
Assert.assertEquals(queue, object);
}