Fixes #6187 Add unit tests for VaultLib