HttpClientConnection con = new HttpClientConnection("localhost", server.getLocalPort());
FutureResponseHandler hdl = new FutureResponseHandler();
BodyDataSink sink = con.send(new HttpRequestHeader("POST", "/", "text/plain; charset=iso-8859-1"), hdl);
sink.flush();
BlockingBodyDataSource source = hdl.getResponse().getBlockingBody();
sink.write("test\r\n");
Assert.assertEquals("test", source.readStringByDelimiter("\r\n"));
sink.write("123\r\n");
Assert.assertEquals("123", source.readStringByDelimiter("\r\n"));
sink.write("456\r\n");
Assert.assertEquals("456", source.readStringByDelimiter("\r\n"));
con.close();
server.close();