Added test for lock/unlock