protected final void addPeer(boolean enabled) throws IOException {
    UTIL.getAdmin().addReplicationPeer(PEER_ID,
      ReplicationPeerConfig.newBuilder().setClusterKey("127.0.0.1:2181:/hbase")
        .setReplicationEndpointImpl(LocalReplicationEndpoint.class.getName()).setSerial(true)
        .build(),
      enabled);
  }
Base class for testing serial replication.
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/SerialReplicationTestBase.java