private void verifyRowCount(Table table, int expectedRegionNum) throws IOException {
    ResultScanner scanner = table.getScanner(new Scan());
    int rowCount = 0;
    while (scanner.next() != null) {
      rowCount++;
    }
    assertEquals(expectedRegionNum, rowCount);
    scanner.close();
  }
This test tests 1, merging region not online; 2, merging same two regions; 3, merging unknown
regions. They are in one test case so that we don't have to create many tables, and these tests
are simple.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransactionOnCluster.java