io.setInput("POST /foo HTTP/1.0\015\012" + "\015\012");
ByteArrayBuffer buffer= new ByteArrayBuffer(4096);
SimpleBuffers buffers=new SimpleBuffers(new Buffer[]{buffer});
Handler handler = new Handler();
HttpParser parser= new HttpParser(buffers,io, handler, buffer.capacity(), 0);
parser.parse();
assertEquals("POST", f0);
assertEquals("/foo", f1);
assertEquals("HTTP/1.0", f2);
assertEquals(-1, h);