@Test
public void testScanWithDeletedRow() throws Exception {

  nextTransactionTs();
  writePutAndData(COLUMN, prewriteTs - 6, commitTs - 6);
  createTransactionWithMock();
  ThemisScanner scanner = prepareScanner(new ColumnCoordinate[]{COLUMN});
  checkReadColumnResultWithTs(scanner.next(), COLUMN, prewriteTs - 6);
  checkAndCloseScanner(scanner);
  // deleted row is at tail
  writeDeleteColumn(COLUMN, prewriteTs - 3, commitTs - 3);
  scanner = prepareScanner(new ColumnCoordinate[]{COLUMN});
  checkAndCloseScanner(scanner);
  // deleted row is at head
  writeDeleteColumn(COLUMN_WITH_ANOTHER_ROW, prewriteTs - 2, commitTs - 2);
  writePutAndData(COLUMN, prewriteTs - 2, commitTs - 2);
  writePutAndData(COLUMN_WITH_ZZ_ROW, prewriteTs - 2, commitTs - 2);
  scanner = prepareScanner(new ColumnCoordinate[]{COLUMN_WITH_ANOTHER_ROW, COLUMN, COLUMN_WITH_ZZ_ROW});
  checkReadColumnResultWithTs(scanner.next(), COLUMN, prewriteTs - 2);
  checkReadColumnResultWithTs(scanner.next(), COLUMN_WITH_ZZ_ROW, prewriteTs - 2);
  checkAndCloseScanner(scanner);
}