private MetricsReplicationSourceSource getGlobalSource() {
    return CompatibilitySingletonFactory.getInstance(MetricsReplicationSourceFactory.class)
      .getGlobalSource();
  }
Remove a peer and wait for it to get cleaned up
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSourceManager.java