test withLock