@SuppressWarnings("resource")
  private void startMiniClusters(int numClusters) throws Exception {
    utilities = new HBaseTestingUtil[numClusters];
    configurations = new Configuration[numClusters];
    for (int i = 0; i < numClusters; i++) {
      Configuration conf = new Configuration(baseConfiguration);
      conf.set(HConstants.ZOOKEEPER_ZNODE_PARENT, "/" + i + ThreadLocalRandom.current().nextInt());
      HBaseTestingUtil utility = new HBaseTestingUtil(conf);
      if (i == 0) {
        utility.startMiniZKCluster();
        miniZK = utility.getZkCluster();
      } else {
        utility.setZkCluster(miniZK);
      }
      utility.startMiniCluster();
      utilities[i] = utility;
      configurations[i] = conf;
      new ZKWatcher(conf, "cluster" + i, null, true);
    }
  }
Tests that base replication peer configs are applied on peer creation and the configs are
overriden if updated as part of updateReplicationPeerConfig()
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestMasterReplication.java