public MockResponseHandler sendRequest(String uri, HttpRequest.Method method, ByteBuffer body) {
        MockResponseHandler responseHandler = new MockResponseHandler();
        Request request = HttpRequest.newServerRequest(driver, URI.create(uri), method);
        request.context().put("contextVariable", 37); // TODO: Add a method for accepting a Request instead
        ContentChannel requestContent = request.connect(responseHandler);
        requestContent.write(body, null);
        requestContent.close(null);
        request.release();
        return this.responseHandler = responseHandler;
    }
Send a POST request with defined content type
container-core/src/main/java/com/yahoo/container/jdisc/RequestHandlerTestDriver.java