Assert.assertNull(decoder.poll());
decoder.offer(ChannelBuffers.wrappedBuffer(new byte[] { 8 }));
ChannelBuffer frame = decoder.poll();
Assert.assertTrue("Produced frame must be a dynamic buffer", frame instanceof DynamicChannelBuffer);
Assert.assertEquals(4, frame.readerIndex());
Assert.assertEquals(4, frame.readableBytes());
Assert.assertEquals(5, frame.getByte(4));
Assert.assertEquals(6, frame.getByte(5));
Assert.assertEquals(7, frame.getByte(6));
Assert.assertEquals(8, frame.getByte(7));