public void testLong() throws Exception
    {
        for (long i : long_targets)
        {
            LinkedBuffer lb = new LinkedBuffer(256);
            WriteSession session = new WriteSession(lb);
            StringSerializer.writeLong(i, session, lb);

            LinkedBuffer lb2 = new LinkedBuffer(1);
            WriteSession session2 = new WriteSession(lb2);
            StringSerializer.writeLong(i, session2, lb2);

            byte[] buffered = session.toByteArray();
            byte[] buffered_needed_to_grow = session2.toByteArray();
            byte[] builtin = STRING.ser(Long.toString(i));

            assertEquals(builtin, buffered);
            assertEquals(builtin, buffered_needed_to_grow);
        }
    }
Tests for UTF-8 Encoding

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