@Test
public void testHardErrorAndReconnect() throws Exception {
RabbitTemplate template = new RabbitTemplate(connectionFactory);
RabbitAdmin admin = new RabbitAdmin(connectionFactory);
Queue queue = new Queue("foo");
admin.declareQueue(queue);
final String route = queue.getName();
final CountDownLatch latch = new CountDownLatch(1);
try {
template.execute(new ChannelCallback<Object>() {