}
public void testString() throws Exception
{
String value = RandomUtil.randomString();
HornetQStreamMessage message = new HornetQStreamMessage();
message.writeString(value);
message.reset();
try
{
message.readByte();
fail("must throw a NumberFormatException");
}
catch (NumberFormatException e)
{
}
// we can read the String without resetting the message
Assert.assertEquals(value, message.readString());
}