ConnectionFactory cf = newConnectionFactory(eh);
assertEquals(cf.getExceptionHandler(), eh);
Connection conn = cf.newConnection();
assertEquals(conn.getExceptionHandler(), eh);
Channel ch = conn.createChannel();
String q = ch.queueDeclare().getQueue();
ch.basicConsume(q, new DefaultConsumer(ch) {
@Override
public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException {
throw new RuntimeException("oops");
}