added test for wiki example for .lock()