Beef up test around obtainLock().