try { msg.readFloat(); fail("Should have failed"); } catch (NumberFormatException e) { /* OK */ }
assertEquals("foobar",msg.readString());
// Double
msg = new StreamMessageImpl();
msg.writeString("foobar");
msg.markAsReadOnly();
try { msg.readDouble(); fail("Should have failed"); } catch (NumberFormatException e) { /* OK */ }
assertEquals("foobar",msg.readString());
// String