private static DocumentUpdate jsonToDocumentUpdate(String jsonDoc, String docId) {
        final InputStream rawDoc = new ByteArrayInputStream(Utf8.toBytes(jsonDoc));
        JsonReader reader = new JsonReader(types, rawDoc, parserFactory);
        return (DocumentUpdate) reader.readSingleDocument(DocumentOperationType.UPDATE, docId).operation();
    }
Tests roundtrip serialization (JSON -> DocumentUpdate -> Buffer -> DocumentUpdate -> JSON) of document updates.

@author Vegard Sjonfjell
document/src/test/java/com/yahoo/document/json/DocumentUpdateJsonSerializerTest.java