public KsqlTarget target(final URI server) {
    return target(server, Collections.emptyMap());
  }
@Test
  public void shouldPostQueryRequest() {

    // Given:
    List<StreamedRow> expectedResponse = new ArrayList<>();
    for (int i = 0; i < 10; i++) {
      GenericRow row = GenericRow.genericRow("foo", 123, true);
      StreamedRow sr = StreamedRow.pushRow(row);
      expectedResponse.add(sr);
    }
    server.setResponseBuffer(createResponseBuffer(expectedResponse));
    String sql = "some sql";

    // When:
    KsqlTarget target = ksqlClient.target(serverUri);
    RestResponse<List<StreamedRow>> response = target.postQueryRequest(
        sql, Collections.emptyMap(), Optional.of(321L));

    // Then:
    assertThat(server.getHttpMethod(), is(HttpMethod.POST));

    assertThat(server.getPath(), is("/query"));
    assertThat(server.getHeaders().get("Accept"), is("application/json"));
    assertThat(getKsqlRequest(), is(new KsqlRequest(sql, properties, Collections.emptyMap(), 321L)));
    assertThat(response.getResponse(), is(expectedResponse));
  }