private void assertDocumentUpdateFlag(boolean createIfNonExistent, int value) {
        DocumentUpdateFlags f1 = new DocumentUpdateFlags();
        f1.setCreateIfNonExistent(createIfNonExistent);
        assertEquals(createIfNonExistent, f1.getCreateIfNonExistent());
        int combined = f1.injectInto(value);
        System.out.println("createIfNonExistent=" + createIfNonExistent + ", value=" + value + ", combined=" + combined);

        DocumentUpdateFlags f2 = DocumentUpdateFlags.extractFlags(combined);
        int extractedValue = DocumentUpdateFlags.extractValue(combined);
        assertEquals(createIfNonExistent, f2.getCreateIfNonExistent());
        assertEquals(value, extractedValue);
    }
Tests applying and serializing document updates.

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