Fixes: U4-2589 Save and Publish is not creating version of document and adds a few unit tests