@Test
    public void testRequireThatCreateIfNonExistentFlagIsSerializedAndDeserialized() {
        docUp.setCreateIfNonExistent(true);

        DocumentSerializer serializer = DocumentSerializerFactory.createHead(new GrowableByteBuffer());
        docUp.serialize(serializer);
        serializer.getBuf().flip();

        DocumentDeserializer deserializer = DocumentDeserializerFactory.createHead(docMan, serializer.getBuf());
        DocumentUpdate deserialized = new DocumentUpdate(deserializer);
        assertEquals(docUp, deserialized);
        assertTrue(deserialized.getCreateIfNonExistent());
    }
Tests applying and serializing document updates.

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