public void testProtostuff() throws Exception
    {
        Schema<Payment> schema = RuntimeSchema.getSchema(Payment.class);
        Payment p = filledPayment();

        byte[] data = ProtostuffIOUtil.toByteArray(p, schema, buf());

        Payment p2 = new Payment();
        ProtostuffIOUtil.mergeFrom(data, 0, data.length, p2, schema);
        /*
         * System.err.println(p2.getId()); System.err.println(p2.getBd()); System.err.println(p2.getBi());
         * System.err.println(p2.getBdList()); System.err.println(p2.getBiList());
         */

        assertEquals(p, p2);

        List<Payment> list = new ArrayList<Payment>();
        list.add(p);
        list.add(p2);

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ProtostuffIOUtil.writeListTo(out, list, schema, buf());
        byte[] listData = out.toByteArray();

        ByteArrayInputStream in = new ByteArrayInputStream(listData);
        List<Payment> parsedList = ProtostuffIOUtil.parseListFrom(in, schema);

        assertEquals(list, parsedList);
    }
@param biList
           the biList to set
protostuff-runtime/src/test/java/io/protostuff/runtime/MathObjectsTest.java