@Test
    public void testThatClearValueUpdateForTensorFieldCanBeApplied() {
        Document doc = createDocument();
        doc.setFieldValue(docType.getField(tensorField), createTensorFieldValue("{{x:0}:2.0}"));
        assertNotNull(doc.getFieldValue(tensorField));

        DocumentUpdate update = new DocumentUpdate(docType, new DocumentId(documentId));
        update.addFieldUpdate(FieldUpdate.createClear(docType.getField(tensorField)));
        update.applyTo(doc);

        assertNull(doc.getFieldValue(tensorField));
    }
Tests applying and serializing document updates.

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