private static GrowableByteBuffer serializeDocumentUpdate(DocumentUpdate update) {
        DocumentSerializer serializer = DocumentSerializerFactory.createHead(new GrowableByteBuffer());
        update.serialize(serializer);
        serializer.getBuf().rewind();
        return serializer.getBuf();
    }
Tests roundtrip serialization (JSON -> DocumentUpdate -> Buffer -> DocumentUpdate -> JSON) of document updates.

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