ConnectionFactory cf = new ConnectionFactory();
ExecutorService executor = Executors.newFixedThreadPool(8);
cf.setSharedExecutor(executor);
AMQConnection conn1 = (AMQConnection)cf.newConnection();
assertFalse(conn1.willShutDownConsumerExecutor());
AMQConnection conn2 = (AMQConnection)cf.newConnection(Executors.newSingleThreadExecutor());
assertFalse(conn2.willShutDownConsumerExecutor());
AMQConnection conn3 = (AMQConnection)cf.newConnection((ExecutorService)null);