@Test
  public void testMoveRegionWhenNotInitialized() {
    SingleProcessHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
    HMaster m = cluster.getMaster();
    try {
      m.setInitialized(false); // fake it, set back later
      RegionInfo meta = RegionInfoBuilder.FIRST_META_REGIONINFO;
      m.move(meta.getEncodedNameAsBytes(), null);
      fail("Region should not be moved since master is not initialized");
    } catch (IOException ioe) {
      assertTrue(ioe instanceof PleaseHoldException);
    } finally {
      m.setInitialized(true);
    }
  }
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