// This IS sends out 10 chunks and waits whether they were received on the server. This tests
// whether the buffering is disabled.
InputStream is = getInputStream();
final HttpUrlConnectorProvider connectorProvider = new HttpUrlConnectorProvider();
ClientConfig clientConfig = new ClientConfig().connectorProvider(connectorProvider);
clientConfig.property(HttpUrlConnectorProvider.USE_FIXED_LENGTH_STREAMING, true);
Client client = ClientBuilder.newClient(clientConfig);
final Response response
= client.target(getBaseUri()).path("resource")
.request().header(HttpHeaders.CONTENT_LENGTH, LENGTH).post(
Entity.entity(is, MediaType.APPLICATION_OCTET_STREAM));