@Test
public void testNamedParams() {

  String queryStr = "select foo, bar from test_ks.test_tab where foo = :foo and bar = :bar";
  LinkedHashMap<String, String> paramTypes = new LinkedHashMap<>();
  paramTypes.put("foo", "varchar");
  paramTypes.put("bar", "int");
  LinkedHashMap<String, Object> params = new LinkedHashMap<>();
  params.put("foo", "any");
  params.put("bar", 100);
  Query selectQuery = new Query(queryStr, new String[] {}, params, paramTypes);
  Map<String, ByteBuffer> namedParamValues = new HashMap<>();
  namedParamValues.put("foo", ByteBuffer.wrap("any".getBytes(StandardCharsets.UTF_8)));
  namedParamValues.put("bar", ByteBuffer.wrap(new byte[] {0, 0, 0, 100}));
  QueryOptions queryOptions =
      new QueryOptions(0, Collections.emptyList(), namedParamValues, true, 0, null, 10, -1, null);
  com.datastax.oss.protocol.internal.request.Query simpleQueryWithNamedParams =
      new com.datastax.oss.protocol.internal.request.Query(queryStr, queryOptions);
  assertThat(selectQuery.matches(FrameUtils.wrapRequest(simpleQueryWithNamedParams))).isTrue();
}