HttpServer server = new HttpServer(reqHdl);
server.start();
HttpClient httpClient = new HttpClient();
FutureResponseHandler respHdl = new FutureResponseHandler();
BodyDataSink ds = httpClient.send(new HttpRequestHeader("POST", "http://localhost:" + server.getLocalPort() + "/", "text/plain;charset=UTF-8"), respHdl);
ds.flush();
QAUtil.sleep(1000);
ds.write("1234567");
ds.close();
IHttpResponse response = respHdl.getResponse();
Assert.assertEquals(200, response.getStatus());
Assert.assertTrue(((HttpServerConnection) reqHdl.getLastCon()).isDelayedClosed());