public void testBar() throws Exception
    {

        for (Bar barCompare : new Bar[] { bar, negativeBar })
        {

            byte[] xdata = MsgpackXIOUtil.toByteArray(barCompare, BAR_SCHEMA, true, buf());
            byte[] data = MsgpackIOUtil.toByteArray(barCompare, BAR_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