@After
  public void clearPeerAndQueues() throws IOException, ReplicationException {
    try {
      admin.removeReplicationPeer(ID_ONE).join();
    } catch (Exception e) {
    }
    try {
      admin.removeReplicationPeer(ID_TWO).join();
    } catch (Exception e) {
    }
    ReplicationQueueStorage queueStorage = ReplicationStorageFactory
      .getReplicationQueueStorage(TEST_UTIL.getConnection(), TEST_UTIL.getConfiguration());
    for (ReplicationQueueData queueData : queueStorage.listAllQueues()) {
      queueStorage.removeQueue(queueData.getId());
    }
    admin.replicationPeerModificationSwitch(true).join();
  }
Class to test asynchronous replication admin operations.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncReplicationAdminApi.java