@Test
public void testScanOneRow() throws Exception {

  // null result
  ColumnCoordinate[] columns = new ColumnCoordinate[]{COLUMN};
  ThemisScanner scanner = prepareScanner(columns);
  checkAndCloseScanner(scanner);
  // only one column written
  columns = new ColumnCoordinate[]{COLUMN};
  prepareScanData(columns);
  scanner = prepareScanner(columns);
  Result result = scanner.next();
  checkScanRow(columns, result);
  checkAndCloseScanner(scanner);
  // one row with multi-columns
  columns = new ColumnCoordinate[]{COLUMN, COLUMN_WITH_ANOTHER_FAMILY, COLUMN_WITH_ANOTHER_QUALIFIER};
  prepareScanData(columns);
  scanner = prepareScanner(columns);
  result = scanner.next();
  checkScanRow(columns, result);
  checkAndCloseScanner(scanner);
  
  // test scan family
  scanner = transaction.getScanner(TABLENAME, new ThemisScan().addFamily(FAMILY));
  result = scanner.next();
  checkScanRow(new ColumnCoordinate[]{COLUMN, COLUMN_WITH_ANOTHER_QUALIFIER}, result);
  checkAndCloseScanner(scanner);
  
  // test scan entire row
  scanner = transaction.getScanner(TABLENAME, new ThemisScan());
  result = scanner.next();
  checkScanRow(columns, result);
  checkAndCloseScanner(scanner);
  
  // test scan family together with column
  scanner = transaction.getScanner(TABLENAME, new ThemisScan().addFamily(ANOTHER_FAMILY)
      .addColumn(FAMILY, QUALIFIER));
  result = scanner.next();
  checkScanRow(new ColumnCoordinate[]{COLUMN_WITH_ANOTHER_FAMILY, COLUMN}, result);
  checkAndCloseScanner(scanner);
}