@SuppressWarnings("unchecked")
    @Test
    void testAsyncOnlyRenderingWithAsyncPostData() throws Exception {
        // Set up
        ProcessorLibrary.ListenableFutureDataSource futureDataSource = new ProcessorLibrary.ListenableFutureDataSource();
        PostReader postReader = new PostReader();
        Chain<Processor> chain = new Chain<>("main",
                new ProcessorLibrary.AsyncDataProcessingInitiator(new Chain<>(postReader)),
                futureDataSource);
        driver = new ProcessingTestDriver(chain);
        RequestHandlerTestDriver.MockResponseHandler responseHandler =
                driver.sendRequest("http://localhost/?chain=main", HttpRequest.Method.POST, "Hello, world!");

        assertFalse(postReader.bodyDataFuture.isDone(), "Post data is read later, on async completion");
        assertEquals(0, responseHandler.available(), "No data is available at this point");

        futureDataSource.incomingData.get().add(new ProcessorLibrary.StringData(null, "d1"));
        assertEquals(
                "{\"datalist\":[" +
                        "{\"data\":\"d1\"}",
                responseHandler.read()
        );
        futureDataSource.incomingData.get().addLast(new ProcessorLibrary.StringData(null, "d2"));

        assertEquals(
                "," +
                        "{\"data\":\"d2\"}" +
                        "]}",
                responseHandler.read()
        );
        assertEquals("Hello, world!", postReader.bodyDataFuture.get().trim(), "Data is completed, so post data is read");

        assertEquals(200, responseHandler.getStatus());
        assertNull(responseHandler.read(), "Transmission completed");
    }
Tests that the ResponseStatus takes precedence over errors
container-core/src/test/java/com/yahoo/processing/handler/ProcessingHandlerTestCase.java