@Test
  public void testPeerBandwidth() throws Exception {
    ReplicationPeerConfigBuilder rpcBuilder =
      ReplicationPeerConfig.newBuilder().setClusterKey(KEY_ONE);

    admin.addReplicationPeer(ID_ONE, rpcBuilder.build()).join();
    ;
    assertEquals(0, admin.getReplicationPeerConfig(ID_ONE).get().getBandwidth());

    rpcBuilder.setBandwidth(2097152);
    admin.updateReplicationPeerConfig(ID_ONE, rpcBuilder.build()).join();
    assertEquals(2097152, admin.getReplicationPeerConfig(ID_ONE).join().getBandwidth());

    admin.removeReplicationPeer(ID_ONE).join();
  }
Class to test asynchronous replication admin operations.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncReplicationAdminApi.java