@Test
  public void test() throws IOException, InterruptedException {
    testUtil.getAdmin()
      .createNamespace(NamespaceDescriptor.create(tableName.getNamespaceAsString()).build());
    Table table = testUtil.createTable(tableName, families);
    table
      .put(new Put(Bytes.toBytes("k")).addColumn(family, Bytes.toBytes("q"), Bytes.toBytes("v")));
    SingleProcessHBaseCluster cluster = testUtil.getMiniHBaseCluster();
    List<JVMClusterUtil.RegionServerThread> rsts = cluster.getRegionServerThreads();
    Region region = null;
    for (int i = 0; i < cluster.getRegionServerThreads().size(); i++) {
      HRegionServer hrs = rsts.get(i).getRegionServer();
      for (Region r : hrs.getRegions(tableName)) {
        region = r;
        break;
      }
    }
    assertNotNull(region);
    Thread.sleep(2000);
    RegionStoreSequenceIds ids = testUtil.getHBaseCluster().getMaster().getServerManager()
      .getLastFlushedSequenceId(region.getRegionInfo().getEncodedNameAsBytes());
    assertEquals(HConstants.NO_SEQNUM, ids.getLastFlushedSequenceId());
    // This will be the sequenceid just before that of the earliest edit in memstore.
    long storeSequenceId = ids.getStoreSequenceId(0).getSequenceId();
    assertTrue(storeSequenceId > 0);
    testUtil.getAdmin().flush(tableName);
    Thread.sleep(2000);
    ids = testUtil.getHBaseCluster().getMaster().getServerManager()
      .getLastFlushedSequenceId(region.getRegionInfo().getEncodedNameAsBytes());
    assertTrue(ids.getLastFlushedSequenceId() + " > " + storeSequenceId,
      ids.getLastFlushedSequenceId() > storeSequenceId);
    assertEquals(ids.getLastFlushedSequenceId(), ids.getStoreSequenceId(0).getSequenceId());
    table.close();
  }
Trivial test to confirm that we can get last flushed sequence id by encodedRegionName. See
HBASE-12715.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java