Producer p = s.createProducer(QUEUE, QoS.AT_LEAST_ONCE);
p.send(msg());
p.close(); // Settlement happens here
Consumer c = s.createConsumer(QUEUE, CONSUMER_LINK_CREDIT, QoS.AT_LEAST_ONCE, false, null);
AMQPMessage m = c.receive();
m.accept();
assertEquals(1, m.getData().size());
assertEquals(data(), m.getData().get(0));
conn.close();
}