Queue queue2 = _session.createQueue(addr2WithoutAltExch);
createQueueOnBroker(queue1);
createQueueOnBroker(queue2);
ManagedQueue managedQueue1 = _jmxUtils.getManagedQueue(queueName1);
assertEquals("Newly created queue1 does not have expected alternate exchange", altExchange1, managedQueue1.getAlternateExchange());
ManagedQueue managedQueue2 = _jmxUtils.getManagedQueue(queueName2);
assertNull("Newly created queue2 does not have expected alternate exchange", managedQueue2.getAlternateExchange());
String altExchange2 = nonMandatoryExchangeName;
managedQueue2.setAlternateExchange(altExchange2);
restartBroker();
managedQueue1 = _jmxUtils.getManagedQueue(queueName1);
assertEquals("Queue1 does not have expected alternate exchange after restart", altExchange1, managedQueue1.getAlternateExchange());
managedQueue2 = _jmxUtils.getManagedQueue(queueName2);
assertEquals("Queue2 does not have expected updated alternate exchange after restart", altExchange2, managedQueue2.getAlternateExchange());
}