private static String documentUpdateToJson(DocumentUpdate update) {
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        DocumentUpdateJsonSerializer serializer = new DocumentUpdateJsonSerializer(outputStream);
        serializer.serialize(update);

        return outputStream.toString(UTF_8);
    }
Tests roundtrip serialization (JSON -> DocumentUpdate -> Buffer -> DocumentUpdate -> JSON) of document updates.

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