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