Put put2 = new Put(rows.get(1));
put1.add(cf, rows.get(0), rows.get(0));
put2.add(cf, rows.get(1), rows.get(1));
hTable.batch(ImmutableList.<Row>of(put1, put2));
ResultScanner rs = hTable.getScanner(new Scan());
Result[] results = rs.next(2);
Assert.assertArrayEquals(rows.get(0), results[0].getRow());
Assert.assertArrayEquals(rows.get(1), results[1].getRow());
rs.close();
assertMetricsUpdated(OpType.BATCH, OpType.GET_SCANNER, OpType.RESULTSCANNER_NEXTARRAY,
OpType.RESULTSCANNER_CLOSE);
}