public void testFooStreamed() throws Exception
    {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        LinkedBuffer buffer = buf();
        try
        {
            MsgpackXIOUtil.writeTo(out, foo, FOO_SCHEMA, true, buffer);
        }
        finally
        {
            buffer.clear();
        }
        byte[] xdata = out.toByteArray();
        byte[] data = MsgpackIOUtil.toByteArray(foo, FOO_SCHEMA, true);

        Assert.assertTrue(Arrays.equals(data, xdata));
    }
Test for MsgpackXOutput on runtime pojos (polymorphic too).

@author Alex Shvid
protostuff-msgpack/src/test/java/io/protostuff/MsgpackXNumericOutputTest.java