@Test
    public void testOptimisticEncoder() {
        for (char i=0; i < 256; i++) {
            StringBuilder sb = new StringBuilder();
            for (char c=0; c < i; c++) {
                sb.append(c);
            }
            assertArrayEquals(Utf8.toBytesStd(sb.toString()), Utf8.toBytes(sb.toString()));
        }
    }
@author <a href="mailto:borud@yahoo-inc.com">Bjorn Borud</a>
@author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
vespajlib/src/test/java/com/yahoo/text/Utf8TestCase.java