// write,pop
ostream.write("abc".getBytes());
ostream.flush();
ByteArray bytes = requestContext.popByteBuffer();
assertEquals("abc", new String(bytes.toByteArray()));
// write, push, write, push, write, pop, pop, pop
ostream.write("abc".getBytes());
ostream.flush();
requestContext.pushBuffer();
ostream.write("def".getBytes());
ostream.flush();
requestContext.pushBuffer();
ostream.write("ghi".getBytes());
ostream.flush();
bytes = requestContext.popByteBuffer();
assertEquals("ghi", new String(bytes.toByteArray()));
bytes = requestContext.popByteBuffer();
assertEquals("def", new String(bytes.toByteArray()));
bytes = requestContext.popByteBuffer();
assertEquals("abc", new String(bytes.toByteArray()));
}