Add test for snapshot lock.