@Override
        public void acquire() {
            if (throwExceptionOnLock)
                throw new CuratorLockException("Thrown by mock");

            lock = locks.lock(path);
        }
A lock which works inside a single vm
zkfacade/src/main/java/com/yahoo/vespa/curator/mock/MockCuratorFramework.java