static <T> void protostuffRoundTrip(T message, Schema<T> schema,
            Pipe.Schema<T> pipeSchema) throws Exception
    {
        byte[] protostuff = ProtostuffIOUtil.toByteArray(message, schema, buf());

        ByteArrayInputStream protostuffStream = new ByteArrayInputStream(protostuff);

        byte[] msgpack = MsgpackIOUtil.toByteArray(
                ProtostuffIOUtil.newPipe(protostuff, 0, protostuff.length), pipeSchema, numeric);

        byte[] msgpackFromStream = MsgpackIOUtil.toByteArray(
                ProtostuffIOUtil.newPipe(protostuffStream), pipeSchema, numeric);

        assertTrue(msgpack.length == msgpackFromStream.length);
        assertEquals(STRING.deser(msgpack), STRING.deser(msgpackFromStream));

        T parsedMessage = schema.newMessage();
        MsgpackIOUtil.mergeFrom(msgpack, parsedMessage, schema, numeric);
        SerializableObjects.assertEquals(message, parsedMessage);

        ByteArrayInputStream msgpackStream = new ByteArrayInputStream(msgpack);

        byte[] protostuffRoundTrip = ProtostuffIOUtil.toByteArray(
                MsgpackIOUtil.newPipe(msgpack, 0, msgpack.length, numeric), pipeSchema, buf());

        byte[] protostuffRoundTripFromStream = ProtostuffIOUtil.toByteArray(
                MsgpackIOUtil.newPipe(msgpackStream, numeric), pipeSchema, buf());

        assertTrue(Arrays.equals(protostuffRoundTrip, protostuffRoundTripFromStream));
        assertTrue(Arrays.equals(protostuffRoundTrip, protostuff));

    }
Test case for msgpack pipes.

@author Alex Shvid
protostuff-msgpack/src/test/java/io/protostuff/MsgpackPipeTest.java