try { msg.readDouble(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals(123,msg.readShort());
// String
msg = new StreamMessageImpl();
msg.writeShort((short)123);
msg.markAsReadOnly();
assertEquals("123",msg.readString());
// Bytes
msg = new StreamMessageImpl();