@Test
  public void testRegionReplicaUpdatesMetaLocation() throws Exception {
    openRegion(HTU, getRS(), hriSecondary);
    Table meta = null;
    try {
      meta = HTU.getConnection().getTable(TableName.META_TABLE_NAME);
      TestMetaTableAccessor.assertMetaLocation(meta, hriPrimary.getRegionName(),
        getRS().getServerName(), -1, 1, false);
    } finally {
      if (meta != null) {
        meta.close();
      }
      closeRegion(HTU, getRS(), hriSecondary);
    }
  }
Tests that the meta location is saved for secondary regions
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicas.java