Add unit tests for prepare-lock-lists.
Improve the tests for versionlocking.