public void testPartialEmptyFoo() throws Exception
    {
        Bar bar = new Bar();
        ArrayList<Bar> bars = new ArrayList<Bar>();
        bars.add(bar);
        Foo foo = new Foo();
        ArrayList<Integer> someInt = new ArrayList<Integer>();
        someInt.add(1);
        foo.setSomeInt(someInt);

        foo.setSomeBar(bars);

        byte[] output = toByteArray(foo);

        Foo parsedFoo = new Foo();
        mergeFrom(output, 0, output.length, parsedFoo, parsedFoo.cachedSchema());
    }
Deserializes from the byte array and data is merged/saved to the message.
protostuff-core/src/test/java/io/protostuff/StandardTest.java