final LargeMessageBufferImpl buffer = new LargeMessageBufferImpl(new FakeConsumerInternal(), 10, 10);
buffer.addPacket(new FakePacket(-1, new byte[] { 0, 1, 2, 3, 4 }, true, true));
byte bytes[] = new byte[30];
buffer.readBytes(bytes, 0, 5);
for (byte i = 0; i < 5; i++)
{
Assert.assertEquals(i, bytes[i]);
}