try { msg.readBoolean(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals(1.23,msg.readDouble(),0);
// Byte
msg = new StreamMessageImpl();
msg.writeDouble(1.23);
msg.markAsReadOnly();
try { msg.readByte(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals(1.23,msg.readDouble(),0);
// Short