@Test
  public void testTruncateRegionsMetaTableRegionsNotAllowed() throws Exception {
    AsyncTableRegionLocator locator = ASYNC_CONN.getRegionLocator(META_TABLE_NAME);
    List<HRegionLocation> regionLocations = locator.getAllRegionLocations().get();
    HRegionLocation regionToBeTruncated = regionLocations.get(0);
    // 1
    try {
      admin.truncateRegion(regionToBeTruncated.getRegion().getRegionName()).get();
      fail();
    } catch (ExecutionException e) {
      // expected
      assertThat(e.getCause(), instanceOf(IOException.class));
      assertEquals("Can't truncate region in catalog tables", e.getCause().getMessage());
    }
  }
Class to test asynchronous region admin operations.
@see TestAsyncRegionAdminApi This test and it used to be joined it was taking longer than our ten
     minute timeout so they were split.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi2.java