public RestResponse<KsqlEntityList> postKsqlRequest(
      final String ksql,
      final Map<String, ?> requestProperties,
      final Optional<Long> previousCommandSeqNum
  ) {
    return post(
        KSQL_PATH,
        createKsqlRequest(ksql, requestProperties, previousCommandSeqNum),
        r -> deserialize(r.getBody(), KsqlEntityList.class)
    );
  }
@Test
  public void shouldUseTimeout() {
    // Given:
    ksqlTarget = new KsqlTarget(httpClient, socketAddress, localProperties, authHeader, HOST,
        ImmutableMap.of(), 300L);

    // When:
    executor.submit(() -> {
      try {
        ksqlTarget.postKsqlRequest("some ksql;", Collections.emptyMap(), Optional.empty());
      } catch (Exception e) {
        // ignore response error since this test is just testing headers on the outgoing request
      }
    });
    assertThatEventually(requestStarted::get, is(true));
    handlerCaptor.getValue().handle(Buffer.buffer());

    // Then:
    verify(httpClient).request(requestOptionsCaptor.capture(), any());
    assertThat(requestOptionsCaptor.getValue().getTimeout(), is(300L));
  }