public KsqlTarget target(final URI server) {
    return target(server, Collections.emptyMap());
  }
@Test
  public void shouldFailtoMakeHttpsRequestWhenServerIsHttp() {
    // When:
    URI uri = URI.create("https://localhost:" + server.getPort());
    KsqlTarget target = ksqlClient.target(uri);
    final KsqlRestClientException e = assertThrows(
        KsqlRestClientException.class,
        () ->  target.postKsqlRequest("ssl test", Collections.emptyMap(), Optional.of(123L))
    );

    // Then:
    assertThat(e.getMessage(), containsString(
        "Error issuing POST to KSQL server. path:/ksql"
    ));
  }