@Test
    public void testWriteUtf8Array() throws IOException {
        stream.reset();
        ByteWriter b = new ByteWriter(stream, encoder);
        final byte[] bytes = Utf8.toBytes("nalle");
        b.write(new Utf8Array(bytes));
        b.close();
        assertArrayEquals(bytes, 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