return new UncategorizedAmqpException(ex);
@Test public void testMismatchedQueue() { try { this.replyListenerContainerWrongQueue.start(); fail("expected exeption"); } catch (UncategorizedAmqpException e) { Throwable t = e.getCause(); assertThat(t, Matchers.instanceOf(IllegalStateException.class)); assertThat(t.getMessage(), Matchers.containsString("Listener expects us to be listening on '[" + TestUtils.getPropertyValue(this.fixedReplyQRabbitTemplateWrongQueue, "replyAddress") + "]'; our queues: " + Arrays.asList(this.replyListenerContainerWrongQueue.getQueueNames()))); } }