private void addPeer(String id, int masterClusterNumber, int slaveClusterNumber, String tableCfs)
    throws Exception {
    try (Connection conn = ConnectionFactory.createConnection(configurations[masterClusterNumber]);
      Admin admin = conn.getAdmin()) {
      admin.addReplicationPeer(id,
        ReplicationPeerConfig.newBuilder()
          .setClusterKey(utilities[slaveClusterNumber].getRpcConnnectionURI())
          .setReplicateAllUserTables(false)
          .setTableCFsMap(ReplicationPeerConfigUtil.parseTableCFsFromConfig(tableCfs)).build());
    }
  }
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