public void testReadBytesWithCount() throws Exception
{
JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
bm.writeByte((byte)3);
bm.writeByte((byte)4);
bm.writeByte((byte)5);
bm.reset();
byte[] result = new byte[3];
int count = bm.readBytes(result, 2);
assertEquals(2, count);
assertEquals((byte)3, result[0]);