public void testDecodeFromString() throws Exception
    {
        for (String str : new String[] { "abcdefgh", "1", "12", "123", "1234", "12345" })
        {
            byte[] b64Encoded = B64Code.encode(str.getBytes("UTF-8"));

            byte[] decoded = B64Code.decode(b64Encoded);

            byte[] decodedFromString = B64Code.decode(new String(b64Encoded, "UTF-8"));

            assertEquals(STRING.deser(decoded), STRING.deser(decodedFromString));

            assertEquals(str, STRING.deser(decoded));
        }
    }
Tests for base 64 encoding.

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