Added tests for Lock