@Test
    public void testApplyRemoveEntireListField() {
        Document doc = new Document(docMan.getDocumentType("foobar"), new DocumentId("id:ns:foobar::foooo"));
        assertNull(doc.getFieldValue("strarray"));
        Array<StringFieldValue> strArray = new Array<>(doc.getField("strarray").getDataType());
        strArray.add(new StringFieldValue("this list"));
        strArray.add(new StringFieldValue("should be"));
        strArray.add(new StringFieldValue("totally removed"));
        doc.setFieldValue("strarray", strArray);
        DocumentUpdate docUp = new DocumentUpdate(docType, new DocumentId("id:toast:foobar::jam"));
        docUp.addFieldPathUpdate(new RemoveFieldPathUpdate(doc.getDataType(), "strarray", null));
        docUp.applyTo(doc);
        assertNull(doc.getFieldValue("strarray"));
    }
Tests applying and serializing document updates.

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