public KsqlTarget target(final URI server) {
    return target(server, Collections.emptyMap());
  }
@Test
  public void shouldHandleErrorMessageOnGetRequests() {
    // Given:
    server.setResponseObject(new KsqlErrorMessage(40000, "ouch"));
    server.setErrorCode(400);

    // When:
    KsqlTarget target = ksqlClient.target(serverUri);
    RestResponse<ServerInfo> response = target.getServerInfo();

    // Then:
    assertThat(response.getStatusCode(), is(400));
    assertThat(response.getErrorMessage().getErrorCode(), is(40000));
    assertThat(response.getErrorMessage().getMessage(), is("ouch"));
  }