@Test
  public void testReplicationPeerNotFoundException() throws InterruptedException {
    String dummyPeer = "dummy_peer";
    try {
      admin.removeReplicationPeer(dummyPeer).get();
      fail();
    } catch (ExecutionException e) {
      assertThat(e.getCause(), instanceOf(ReplicationPeerNotFoundException.class));
    }
  }
Tests that admin api throws ReplicationPeerNotFoundException if peer doesn't exist.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncReplicationAdminApi.java