channel.queueBind(q, x, "");
final AtomicReference<String> nameBefore = new AtomicReference<String>();
final AtomicReference<String> nameAfter = new AtomicReference<String>();
final CountDownLatch listenerLatch = new CountDownLatch(1);
((AutorecoveringConnection)connection).addQueueRecoveryListener(new QueueRecoveryListener() {
@Override
public void queueRecovered(String oldName, String newName) {
nameBefore.set(oldName);
nameAfter.set(newName);
listenerLatch.countDown();