static void checkVarDelimited(CharSequence str, int size, int stringLen) throws Exception
    {
        LinkedBuffer lb = new LinkedBuffer(512);
        WriteSession session = new WriteSession(lb);
        StringSerializer.writeUTF8VarDelimited(str, session, lb);

        byte[] buf = session.toByteArray();

        assertTrue(buf.length == stringLen + size);

        int len = readRawVarint32(lb.buffer, 0);
        assertTrue(len == stringLen);

        print("total len: " + buf.length);
    }
Tests for UTF-8 Encoding

@author David Yu
@created Jul 6, 2010
protostuff-api/src/test/java/io/protostuff/StringSerializerTest.java