public void testBar() throws Exception
    {
        for (Bar barCompare : new Bar[] { bar, negativeBar })
        {
            Bar dbar = new Bar();

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