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