@Test
  public void testFlushedSequenceIdPersistLoad() throws Exception {
    Configuration conf = TEST_UTIL.getConfiguration();
    int msgInterval = conf.getInt("hbase.regionserver.msginterval", 100);
    // insert some data into META
    TableName tableName = TableName.valueOf("testFlushSeqId");
    TableDescriptor tableDescriptor = TableDescriptorBuilder.newBuilder(tableName)
      .setColumnFamily(ColumnFamilyDescriptorBuilder.of(Bytes.toBytes("cf"))).build();
    Table table = TEST_UTIL.createTable(tableDescriptor, null);
    // flush META region
    TEST_UTIL.flush(TableName.META_TABLE_NAME);
    // wait for regionserver report
    Threads.sleep(msgInterval * 2);
    // record flush seqid before cluster shutdown
    Map<byte[], Long> regionMapBefore =
      TEST_UTIL.getHBaseCluster().getMaster().getServerManager().getFlushedSequenceIdByRegion();
    // restart hbase cluster which will cause flushed sequence id persist and reload
    TEST_UTIL.getMiniHBaseCluster().shutdown();
    TEST_UTIL.restartHBaseCluster(2);
    TEST_UTIL.waitUntilNoRegionsInTransition();
    // check equality after reloading flushed sequence id map
    Map<byte[], Long> regionMapAfter =
      TEST_UTIL.getHBaseCluster().getMaster().getServerManager().getFlushedSequenceIdByRegion();
    assertTrue(regionMapBefore.equals(regionMapAfter));
  }
Return the region and current deployment for the region containing the given row. If the region
cannot be found, returns null. If it is found, but not currently deployed, the second element
of the pair may be null.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMaster.java