DeliveryRunnable dr = new DeliveryRunnable(del, null, consumerID, false);
DeliveryRunnable dr = new DeliveryRunnable(del, consumerID, null, false);
      public void testCallback() throws Exception      {         int consumerID = 12345678;                  JBossMessage m = new JBossMessage(new GUID().toString());                  MessageDelegate del = JBossMessage.createThinDelegate(m, 7);                  MessageTest.configureMessage(m);                  DeliveryRunnable dr = new DeliveryRunnable(del, null, consumerID, false);                  ByteArrayOutputStream bos = new ByteArrayOutputStream();                  JBossObjectOutputStream oos = new JBossObjectOutputStream(bos);                  InvocationRequest ir = new InvocationRequest(null, null, dr, null, null, null);                  wf.write(ir, oos);                  oos.flush();                  ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());                           JBossObjectInputStream ois = new JBossObjectInputStream(bis);                  //Check the bytes                  //First byte should be CALLBACK         assertEquals(JMSWireFormat.CALLBACK, ois.readByte());                  //Next int should be consumer id         assertEquals(12345678, ois.readInt());                  //Next byte should be type         assertEquals(JBossMessage.TYPE, ois.readByte());                  //Next int should be delivery count         assertEquals(7, ois.readInt());                  //And now the message itself         JBossMessage m2 = new JBossMessage();                  m2.readExternal(ois);                  MessageTest.ensureEquivalent(m, m2);                  //eos         try         {            ois.readByte();            fail("End of stream expected");         }         catch (EOFException e)         {            //Ok         }                  bis.reset();                  ois = new JBossObjectInputStream(bis);                  InvocationRequest ir2 = (InvocationRequest)wf.read(ois, null);                  DeliveryRunnable dr2 = (DeliveryRunnable)ir2.getParameter();                  MessageDelegate del2 = dr2.getMessageDelegate();                  JBossMessage m3 = del2.getMessage();                  assertEquals(consumerID, dr2.getConsumerID());                  assertEquals(7, del2.getDeliveryCount());                  MessageTest.ensureEquivalent(m, m3);                }