@Test
  public void testMiniDFSCluster() throws Exception {
    HBaseTestingUtil hbt = new HBaseTestingUtil();
    MiniDFSCluster cluster = hbt.startMiniDFSCluster(null);
    FileSystem dfs = cluster.getFileSystem();
    Path dir = new Path("dir");
    Path qualifiedDir = dfs.makeQualified(dir);
    LOG.info("dir=" + dir + ", qualifiedDir=" + qualifiedDir);
    assertFalse(dfs.exists(qualifiedDir));
    assertTrue(dfs.mkdirs(qualifiedDir));
    assertTrue(dfs.delete(qualifiedDir, true));
    hbt.shutdownMiniCluster();
  }
Test that we can start and stop multiple time a cluster with the same HBaseTestingUtility.
hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtil.java