BACKLOG-4499 : add unit tests for locks (based on the jahia core ones)