public void testGenerateParseOneByteAtATime() throws Exception
{
int lastStreamId = 13;
int statusCode = 1;
GoAwayFrame frame1 = new GoAwayFrame(SPDY.V3, lastStreamId, statusCode);
Generator generator = new Generator(new MappedByteBufferPool(), new StandardCompressionFactory().newCompressor());
ByteBuffer buffer = generator.control(frame1);
Assert.assertNotNull(buffer);
TestSPDYParserListener listener = new TestSPDYParserListener();
Parser parser = new Parser(new StandardCompressionFactory().newDecompressor());
parser.addListener(listener);
while (buffer.hasRemaining())
parser.parse(ByteBuffer.wrap(new byte[]{buffer.get()}));
ControlFrame frame2 = listener.getControlFrame();