Fix lock/unlock functional tests