@Test
public void testCleanLockFromPrimary() throws IOException {

  // must set column before cleanLock
  ThemisLock from = getLock(COLUMN);
  // primary lock exist
  writeLockAndData(COLUMN);
  prepareCleanSecondaryLocks(false);
  lockCleaner.cleanLock(from);
  checkTransactionRollback();
  // transaction committed with primary lock cleaned
  deleteOldDataAndUpdateTs();
  writePutAndData(COLUMN, prewriteTs, commitTs);
  prepareCleanSecondaryLocks(true);
  from = getLock(COLUMN);
  lockCleaner.cleanLock(from);
  checkTransactionCommitSuccess();
  // transaction uncommitted with primary lock erased
  deleteOldDataAndUpdateTs();
  writeData(COLUMN, prewriteTs);
  prepareCleanSecondaryLocks(false);
  from = getLock(COLUMN);
  lockCleaner.cleanLock(from);
  checkTransactionRollback();
}