Connection conn = new Connection(ctx, host, port, false);
conn.connect();
Session s = conn.createSession(INBOUND_WINDOW, OUTBOUND_WINDOW);
Producer p = s.createProducer(QUEUE, QoS.AT_LEAST_ONCE);
AMQPMessage msg = new AMQPMessage();
List<AMQPType> al = new ArrayList<AMQPType>();
al.add(new AMQPBoolean(true));
al.add(new AMQPByte(Byte.MAX_VALUE));
al.add(new AMQPChar(Character.CURRENCY_SYMBOL));
al.add(new AMQPDecimal64(BigDecimal.TEN));
al.add(new AMQPDouble(Double.NaN));
al.add(new AMQPInt(Integer.MIN_VALUE));
al.add(new AMQPNull());
al.add(new AMQPString("\uFFF9"));
al.add(new AMQPSymbol(new String(new char[256])));
al.add(new AMQPTimestamp(Long.MAX_VALUE));
al.add(new AMQPUuid(System.currentTimeMillis(), Long.MIN_VALUE));
al.add(new AMQPUnsignedShort(0));
al.add(new AMQPArray(AMQPBoolean.FALSE.getCode(), new AMQPBoolean[]{}));
al.add(new AmqpSequence(new ArrayList<AMQPType>()));
AmqpSequence seq = new AmqpSequence(al);
AmqpValue val = new AmqpValue(seq);
msg.setAmqpValue(val);
p.send(msg);
p.close();
Consumer c = s.createConsumer(QUEUE, CONSUMER_LINK_CREDIT, QoS.AT_LEAST_ONCE, false, null);
AMQPMessage recvMsg = c.receive();
recvMsg.accept();
assertEquals(val.getValue().getValueString(), recvMsg.getAmqpValue().getValue().getValueString());
conn.close();
}