@Test
public void createsRegularLockIfDebugIsDisabled() {

  Configuration config = createNiceMock(Configuration.class);
  expect(config.isServerLocksProfilingEnabled()).andReturn(false);
  replayAll();
  LockFactory factory = new LockFactory(config);
  Lock lock = factory.newLock();
  Assert.assertTrue(lock instanceof ReentrantLock);
  verifyAll();
}