public void testFooSkipMessage() throws Exception
    {
        final CustomSchema<Foo> fooSchema = new CustomSchema<Foo>(foo.cachedSchema())
        {
            @Override
            public void writeTo(Output output, Foo message) throws IOException
            {
                // 10 is an unknown field
                output.writeObject(10, baz, Baz.getSchema(), false);
                super.writeTo(output, message);
            }
        };

        Foo fooCompare = foo;
        Foo dfoo = new Foo();

        byte[] output = toByteArray(fooCompare, fooSchema);
        mergeFrom(output, 0, output.length, dfoo, dfoo.cachedSchema());
        SerializableObjects.assertEquals(fooCompare, dfoo);
    }
Deserializes from the byte array and data is merged/saved to the message.
protostuff-core/src/test/java/io/protostuff/SerDeserTest.java