@Test
public void shouldHandleQuerySpecificPeerNamedParameter() throws UnknownHostException {

  // when peer query is made for a peer in the cluster using named parameters, we should get 1 row
  // back.
  InetAddress addr = InetAddress.getByAddress(new byte[] {127, 0, 11, 17});
  Map<String, ByteBuffer> params = new HashMap<>();
  params.put("address", ByteBuffer.wrap(addr.getAddress()));
  QueryOptions queryOptions =
      new QueryOptions(
          0, Collections.emptyList(), params, false, 0, null, 10, Long.MIN_VALUE, null);
  List<String> queries =
      Arrays.asList(
          "SELECT * FROM system.peers WHERE peer=:address",
          "select * from system.peers where peer = :address",
          " select  *  from  system.peers  where  peer = :address ; ");
  for (String query : queries) {
    List<Action> node0Actions = handler.getActions(node0, queryFrame(query, queryOptions));
    assertThat(node0Actions).hasSize(1);
    Action node0Action = node0Actions.get(0);
    assertThat(node0Action).isInstanceOf(MessageResponseAction.class);
    Message node0Message = ((MessageResponseAction) node0Action).getMessage();
    // should be 1 matching peer
    assertThat(node0Message)
        .isRows()
        .hasRows(1)
        .hasColumnSpecs(8)
        .hasColumn(0, 0, addr)
        .hasColumn(0, 1, "dc1");
  }
}