public void testBaz() throws Exception
    {
        for (Baz bazCompare : new Baz[] { baz, negativeBaz })
        {
            Baz dbaz = new Baz();

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