@Test
    public void testUnMappableCharacter() throws java.io.IOException {
        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        ByteWriter writer = new ByteWriter(stream, Charset.forName("ascii").newEncoder());
        writer.write("yahoo\u9999bahoo");
        writer.close();
        assertTrue(stream.toString("ascii").contains("yahoo"));
        assertTrue(stream.toString("ascii").contains("bahoo"));
    }
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