@BeforeClass
  public static void setupCluster() throws Exception {
    setupConf(UTIL.getConfiguration());
    UTIL.startMiniCluster(NUM_RS);

    fs = UTIL.getHBaseCluster().getMaster().getMasterFileSystem().getFileSystem();
    rootDir = UTIL.getHBaseCluster().getMaster().getMasterFileSystem().getRootDir();
  }
Test class to verify that metadata is consistent before and after a snapshot attempt.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java