_session = (AMQSession<?, ?>) _connection.createSession(true, Session.SESSION_TRANSACTED);
}
public void testDeclareAndBindWhenQueueIsNotSpecifiedInDestinationUrl() throws Exception
{
AMQQueue destination = new AMQQueue(new AMQBindingURL("topic://amq.topic//?routingkey='testTopic'"));
assertEquals("Queue name is generated in parser", AMQShortString.EMPTY_STRING, destination.getAMQQueueName());
_session.declareAndBind(destination, FieldTable.convertToFieldTable(Collections.<String, Object> emptyMap()));
assertFalse("Unexpected queue name: [" + destination.getAMQQueueName() + "]", AMQShortString.EMPTY_STRING.equals(destination.getAMQQueueName()));
sendMessage(_session, destination, 1);
MessageConsumer consumer = _session.createConsumer(destination);
_connection.start();