Add lock tests