@Test
    public void testThatIdenticalAssignCanBePrunedAway() {
        Field field = docType.getField("strfoo");
        String expected = "some value";
        Document doc = createDocument();
        doc.setFieldValue(field, "some value");
        DocumentUpdate update = new DocumentUpdate(docType, new DocumentId(documentId));
        update.addFieldUpdate(FieldUpdate.createAssign(field,new StringFieldValue(expected)));
        update.prune(doc);
        assertEquals(0, update.size());
        update.applyTo(doc);
        assertEquals(expected, doc.getFieldValue(field).getWrappedValue());
    }
Tests applying and serializing document updates.

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