@BeforeClass
  public static void setUp() throws Exception {
    UTIL.startMiniCluster(1);
    // add a peer to force initialize the replication storage
    UTIL.getAdmin().addReplicationPeer("1", ReplicationPeerConfig.newBuilder()
      .setClusterKey(UTIL.getZkCluster().getAddress().toString() + ":/1").build());
    UTIL.getAdmin().removeReplicationPeer("1");
  }
Make sure we could start the cluster with RegionReplicaReplicationEndpoint configured.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/regionreplication/TestStartupWithLegacyRegionReplicationEndpoint.java