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

    // Given:
    int numRows = 10;
    List<String> expectedResponse = setupPrintTopicResponse(numRows);
    String command = "print topic whatever";

    // When:
    KsqlTarget target = ksqlClient.target(serverUri);
    RestResponse<StreamPublisher<String>> response = target
        .postPrintTopicRequest(command, Optional.of(123L));

    // 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(command, properties, Collections.emptyMap(), 123L)));

    List<String> lines = getElementsFromPublisher(numRows, response.getResponse());
    assertThat(lines, is(expectedResponse));
  }