}
public void testReadBytesFromBytes_2() throws Exception
{
byte[] value = RandomUtil.randomBytes(512);
HornetQStreamMessage message = new HornetQStreamMessage();
message.writeBytes(value, 0, 256);
message.reset();
byte[] v = new byte[256];
message.readBytes(v);
UnitTestCase.assertEqualsByteArrays(256, value, v);
}