added more tests for lock/unlock