unit tests fro lock