try { msg.readFloat(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertTrue(msg.readBoolean());
// Double
msg = new StreamMessageImpl();
msg.writeBoolean(true);
msg.markAsReadOnly();
try { msg.readDouble(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertTrue(msg.readBoolean());
// String