add Lock unit tests