public void testPolymorphicStreamed() throws Exception
    {
        Zoo zooCompare = PolymorphicSerializationTest.filledZoo();

        Zoo dzoo = new Zoo();

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        LinkedBuffer buffer = buf();
        try
        {
            MsgpackXIOUtil.writeTo(out, zooCompare, ZOO_SCHEMA, true, buffer);
        }
        finally
        {
            buffer.clear();
        }
        byte[] data = out.toByteArray();

        MsgpackIOUtil.mergeFrom(data, dzoo, ZOO_SCHEMA, true);
        SerializableObjects.assertEquals(zooCompare, dzoo);
    }
Test for MsgpackXOutput on runtime pojos (polymorphic too).

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