attributes.put(Queue.NAME, queueName);
AMQQueue queue = _queueFactory.createQueue(attributes);
assertEquals("Unexpected maximum delivery count", 5, queue.getMaximumDeliveryAttempts());
ExchangeImpl altExchange = queue.getAlternateExchange();
assertNotNull("Queue should have an alternate exchange as DLQ is enabled", altExchange);
assertEquals("Alternate exchange name was not as expected", dlExchangeName, altExchange.getName());
assertEquals("Alternate exchange type was not as expected", ExchangeDefaults.FANOUT_EXCHANGE_CLASS, altExchange.getTypeName());
assertNotNull("The alternate exchange was not registered as expected", _virtualHost.getExchange(dlExchangeName));
assertEquals("The registered exchange was not the expected exchange instance", altExchange, _virtualHost.getExchange(dlExchangeName));
AMQQueue dlQueue = _virtualHost.getQueue(dlQueueName);
assertNotNull("The DLQ was not registered as expected", dlQueue);
assertTrue("DLQ should have been bound to the alternate exchange", altExchange.isBound(dlQueue));
assertNull("DLQ should have no alternate exchange", dlQueue.getAlternateExchange());
assertEquals("DLQ should have a zero maximum delivery count", 0, dlQueue.getMaximumDeliveryAttempts());
//2 queues should have been registered
verifyRegisteredQueueCount(2);