Rename variable to `lock` in tests.