@Test
    public void testAssignSerialization() {
        DocumentUpdate docUp = new DocumentUpdate(docType, new DocumentId("id:ns:foobar::bar"));
        AssignFieldPathUpdate ass = new AssignFieldPathUpdate(docType, "num", "", "3");
        ass.setCreateMissingPath(false);
        docUp.addFieldPathUpdate(ass);

        GrowableByteBuffer buffer = new GrowableByteBuffer();
        docUp.serialize(DocumentSerializerFactory.createHead(buffer));
        buffer.flip();
        DocumentUpdate docUp2 = new DocumentUpdate(DocumentDeserializerFactory.createHead(docMan, buffer));

        assertEquals(docUp, docUp2);
    }
Tests applying and serializing document updates.

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