added tests for Lock