@Test
    public void testWriteFloat() throws java.io.IOException {
        stream.reset();
        ByteWriter b = new ByteWriter(stream, encoder);
        b.write(12.0f);
        b.close();
        assertArrayEquals(Utf8.toBytes("12.0"), stream.toByteArray());
    }
A stream which does nothing, but complains if it is called and asked to
do nothing.
vespajlib/src/test/java/com/yahoo/io/ByteWriterTestCase.java