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