@Ignore
    @Test
    public void testCppDocUpd() throws IOException {
        docMan = DocumentTestCase.setUpCppDocType();
        byte[] data = DocumentTestCase.readFile("src/tests/data/serializeupdatecpp.dat");
        DocumentDeserializer buf = DocumentDeserializerFactory.createHead(docMan, GrowableByteBuffer.wrap(data));

        DocumentType type = docMan.getDocumentType("serializetest");

        DocumentUpdate upd = new DocumentUpdate(buf);

        assertEquals(new DocumentId("id:ns:serializetest::update"), upd.getId());
        assertEquals(type, upd.getType());

        FieldUpdate serAssignFU = upd.getFieldUpdate(type.getField("intfield"));
        assertEquals(type.getField("intfield"), serAssignFU.getField());
        ValueUpdate serAssign = serAssignFU.getValueUpdate(0);
        assertEquals(ValueUpdate.ValueUpdateClassID.ASSIGN, serAssign.getValueUpdateClassID());
        assertEquals(new IntegerFieldValue(4), serAssign.getValue());

        ValueUpdate serArith = serAssignFU.getValueUpdate(1);
        assertEquals(ValueUpdate.ValueUpdateClassID.ARITHMETIC, serArith.getValueUpdateClassID());

        FieldUpdate serAddFU = upd.getFieldUpdate(type.getField("arrayoffloatfield"));
        assertEquals(type.getField("arrayoffloatfield"), serAddFU.getField());
        ValueUpdate serAdd1 = serAddFU.getValueUpdate(0);
        assertEquals(ValueUpdate.ValueUpdateClassID.ADD, serAdd1.getValueUpdateClassID());
        FloatFieldValue addParam1 = (FloatFieldValue)serAdd1.getValue();
        assertEquals(new FloatFieldValue(5.00f), addParam1);
        ValueUpdate serAdd2 = serAddFU.getValueUpdate(1);
        assertEquals(ValueUpdate.ValueUpdateClassID.ADD, serAdd2.getValueUpdateClassID());
        FloatFieldValue addparam2 = (FloatFieldValue)serAdd2.getValue();
        assertEquals(new FloatFieldValue(4.23f), addparam2);
        ValueUpdate serAdd3 = serAddFU.getValueUpdate(2);
        assertEquals(ValueUpdate.ValueUpdateClassID.ADD, serAdd3.getValueUpdateClassID());
        FloatFieldValue addparam3 = (FloatFieldValue)serAdd3.getValue();
        assertEquals(new FloatFieldValue(-1.00f), addparam3);

        FieldUpdate wsetFU = upd.getFieldUpdate(type.getField("wsfield"));
        assertEquals(type.getField("wsfield"), wsetFU.getField());
        assertEquals(2, wsetFU.size());
        ValueUpdate mapUpd = wsetFU.getValueUpdate(0);
        assertEquals(ValueUpdate.ValueUpdateClassID.MAP, mapUpd.getValueUpdateClassID());
        mapUpd = wsetFU.getValueUpdate(1);
        assertEquals(ValueUpdate.ValueUpdateClassID.MAP, mapUpd.getValueUpdateClassID());
    }
Tests applying and serializing document updates.

@author Einar M R Rosenvinge
document/src/test/java/com/yahoo/document/DocumentUpdateTestCase.java