assertNotNull(queue.poll(10, TimeUnit.SECONDS));
SimpleMessageListenerContainer listenerContainer = context.getBean("container4",
SimpleMessageListenerContainer.class);
listenerContainer.stop();
RabbitAdmin admin = spy(TestUtils.getPropertyValue(listenerContainer, "rabbitAdmin", RabbitAdmin.class));
new DirectFieldAccessor(listenerContainer).setPropertyValue("rabbitAdmin", admin);
listenerContainer = spy(listenerContainer);
//Prevent a long 'passiveDeclare' process
BlockingQueueConsumer consumer = mock(BlockingQueueConsumer.class);
doThrow(RuntimeException.class).when(consumer).start();