protected final void addPeer(String peerId, TableName tableName) throws Exception {
    if (!peerExist(peerId)) {
      ReplicationPeerConfigBuilder builder = ReplicationPeerConfig.newBuilder()
        .setClusterKey(getClusterKey(UTIL2)).setSerial(isSerialPeer())
        .setReplicationEndpointImpl(ReplicationEndpointTest.class.getName());
      if (isSyncPeer()) {
        FileSystem fs2 = UTIL2.getTestFileSystem();
        // The remote wal dir is not important as we do not use it in DA state, here we only need to
        // confirm that a sync peer in DA state can still replicate data to remote cluster
        // asynchronously.
        builder.setReplicateAllUserTables(false)
          .setTableCFsMap(ImmutableMap.of(tableName, ImmutableList.of()))
          .setRemoteWALDir(new Path("/RemoteWAL")
            .makeQualified(fs2.getUri(), fs2.getWorkingDirectory()).toUri().toString());
      }
      hbaseAdmin.addReplicationPeer(peerId, builder.build());
    }
  }
This class is only a base for other integration-level replication tests. Do not add tests here.
TestReplicationSmallTests is where tests that don't require bring machines up/down should go All
other tests should have their own classes and extend this one
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationBase.java