Added tests when updating with whole document. Added  clause to make sure that nothing added to stored document.