}
public void testReadObjectFromBytes() throws Exception
{
byte[] value = RandomUtil.randomBytes();
HornetQStreamMessage message = new HornetQStreamMessage();
message.writeBytes(value);
message.reset();
byte[] v = (byte[])message.readObject();
UnitTestCase.assertEqualsByteArrays(value, v);
}