public void testStream() throws Exception
    {
        // everything will fit
        testStream("1234567", new LinkedBuffer(12));
        // need to flush once
        testStream("1234567", str('a', 4), newBuffer(12, 'a', 4));
        // 1 write chunk and encode remaining
        testStream("1234567", new LinkedBuffer(4));
        // no write chunks and encode remaining
        testStream("1234567", str('a', 1), newBuffer(4, 'a', 1));
        // 1 write chunk and encode remaining
        testStream("1234567", str('a', 4), newBuffer(8, 'a', 4));
    }
Tests for base 64 encoding.

@author David Yu
@created Sep 27, 2010
protostuff-api/src/test/java/io/protostuff/B64CodeTest.java