assertEquals(123,msg.readLong());
// Short
msg = new StreamMessageImpl();
msg.writeLong(123);
msg.markAsReadOnly();
try { msg.readShort(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals(123,msg.readLong());
// Char
msg = new StreamMessageImpl();