private <T> RestResponse<T> get(final String path, final Class<T> type) {
    return executeRequestSync(HttpMethod.GET,
            path,
            null,
            r -> deserialize(r.getBody(), type),
            Optional.empty());
  }
@Test
  public void shouldPostQueryRequest_chunkHandler_exception() {
    ksqlTarget = new KsqlTarget(httpClient, socketAddress, localProperties, authHeader, HOST,
        Collections.emptyMap(), RequestOptions.DEFAULT_TIMEOUT);
    executor.submit(this::expectPostQueryRequestChunkHandler);

    assertThatEventually(requestStarted::get, is(true));

    exceptionCaptor.getValue().handle(new RuntimeException("Error!"));

    assertThatEventually(error::get, notNullValue());
    assertThat(error.get().getMessage(),
        containsString("Error issuing POST to KSQL server. path:/query"));
  }