@Test
public void shouldMatchLocalAndPeersQueries() {

  // Should match the following queries.
  assertThat(handler.matches(node0, queryFrame("SELECT * FROM system.peers"))).isTrue();
  assertThat(handler.matches(node0, queryFrame(" select  *  from  system.peers  ; "))).isTrue();
  assertThat(handler.matches(node0, queryFrame("SELECT * FROM system.peers_v2"))).isTrue();
  assertThat(handler.matches(node0, queryFrame(" select  *  from  system.peers_v2  ; ")))
      .isTrue();
  assertThat(handler.matches(node0, queryFrame("SELECT cluster_name FROM system.local")))
      .isTrue();
  assertThat(handler.matches(node0, queryFrame(" select  cluster_name  from  system.local ; ")))
      .isTrue();
  assertThat(handler.matches(node0, queryFrame("SELECT * FROM system.local WHERE key='local'")))
      .isTrue();
  assertThat(
          handler.matches(
              node0, queryFrame(" select  *  from  system.local  where  key = 'local' ; ")))
      .isTrue();
  // Should match individual peer query no matter the address.
  assertThat(
          handler.matches(node0, queryFrame("SELECT * FROM system.peers WHERE peer='127.0.3.2'")))
      .isTrue();
  assertThat(
          handler.matches(
              node0, queryFrame(" select  *  from  system.peers  where  peer = '127.0.3.2' ; ")))
      .isTrue();
  assertThat(
          handler.matches(node0, queryFrame("SELECT * FROM system.peers WHERE peer='17.0.3.7'")))
      .isTrue();
  assertThat(
          handler.matches(
              node0, queryFrame(" select  *  from  system.peers  where  peer = '17.0.3.7' ; ")))
      .isTrue();
  assertThat(handler.matches(node0, queryFrame("SELECT * FROM system.peers WHERE peer=:address")))
      .isTrue();
  assertThat(
          handler.matches(
              node0, queryFrame(" select  *  from  system.peers  where  peer = :address ; ")))
      .isTrue();
  assertThat(
          handler.matches(
              node0,
              queryFrame(
                  "SELECT * FROM system.peers_v2 WHERE peer=:address AND peer_port=:port")))
      .isFalse();
  assertThat(
          handler.matches(
              node0,
              queryFrame(
                  " select  *  from  system.peers_v2  where  peer = :address  and  peer_port = :port ; ")))
      .isFalse();
  assertThat(
          handlerV2.matches(
              node0,
              queryFrame(
                  "SELECT * FROM system.peers_v2 WHERE peer=:address AND peer_port=:port")))
      .isTrue();
  assertThat(
          handlerV2.matches(
              node0,
              queryFrame(
                  " select  *  from  system.peers_v2  where  peer = :address  and  peer_port = :port ; ")))
      .isTrue();
}