private static void writeBufferToFile(GrowableByteBuffer buf, String fileName) throws IOException {
        FileOutputStream fos = new FileOutputStream(fileName);
        fos.write(buf.array(), 0, buf.remaining());
        fos.close();
    }
Tests applying and serializing document updates.

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