Test for locks