*/
public class JabberWireFormatTest extends TestCase {
protected WireFormat format = new JabberWireFormat();
public void testWrite() throws Exception {
ActiveMQTextMessage message = new ActiveMQTextMessage();
message.setJMSType("id");
message.setJMSReplyTo(new ActiveMQTopic("my.source"));
message.setJMSDestination(new ActiveMQTopic("my.target"));
message.setJMSCorrelationID("abc123");
message.setText("<body>hello there </body>");
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(buffer);
format.writePacket(message, out);
out.close();