msg.markAsReadOnly();
assertEquals("foobar",msg.readString());
// Bytes
msg = new StreamMessageImpl();
msg.writeString("foobar");
msg.markAsReadOnly();
try { msg.readBytes(new byte[1]); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals("foobar",msg.readString());
}