@After
  public void tearDownAfterTest() throws IOException {
    for (ReplicationPeerDescription desc : UTIL.getAdmin().listReplicationPeers()) {
      UTIL.getAdmin().removeReplicationPeer(desc.getPeerId());
    }
  }
All the modification method will fail once in the test and should finally succeed.
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationProcedureRetry.java