public void testBarTooLarge2() throws Exception
    {
        Schema<Bar> schema = Bar.getSchema();
        Bar message = new Bar();
        message.setSomeBytes(ByteString.wrap(
                new byte[StringSerializer.THREE_BYTE_LOWER_LIMIT - 1]));

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        int size = optWriteDelimitedTo(out, message, schema, buf());
        int delimSize = ProtobufOutput.computeRawVarint32Size(size);
        byte[] data = out.toByteArray();

        int expectedSize = size + delimSize;
        assertEquals(expectedSize, data.length);
        verifyOptData(data, message, schema, buf());

        ByteArrayInputStream in = new ByteArrayInputStream(data);

        Bar parsedMessage = schema.newMessage();
        boolean merged = optMergeDelimitedFrom(in, parsedMessage, schema, buf(256));
        assertFalse(merged);
    }
Deserializes from the byte array and data is merged/saved to the message.
protostuff-core/src/test/java/io/protostuff/DelimiterTest.java