@Test
    public void testFooRepeated() throws Exception
    {
        ArrayList<FooMessage> foos = new ArrayList<FooMessage>();
        foos.add(new FooMessage("1", "2"));
        foos.add(new FooMessage("a", "b", "c"));

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        MsgpackXIOUtil.writeListTo(out, foos, FOO_SCHEMA, false, LinkedBuffer.allocate());
        byte[] xdata = out.toByteArray();
        out = new ByteArrayOutputStream();
        MsgpackIOUtil.writeListTo(out, foos, FOO_SCHEMA, false);
        byte[] data = out.toByteArray();

        Assert.assertTrue(Arrays.equals(data, xdata));

        ByteArrayInputStream in = new ByteArrayInputStream(data);
        List<FooMessage> parsedFoos = MsgpackIOUtil.parseListFrom(in, FOO_SCHEMA, false);

        Assert.assertEquals(foos.size(), parsedFoos.size());
        int i = 0;
        for (FooMessage f : parsedFoos)
        {
            Assert.assertEquals(foos.get(i++).field, f.field);
        }
    }
Compatible with

http://kawanet.github.io/msgpack-lite/
protostuff-msgpack/src/test/java/io/protostuff/MsgpackSimpleTest.java