ForwardingReadableBuffer implements ReadableBuffer { @Override public int arrayOffset() { return buf.arrayOffset(); } ForwardingReadableBuffer(ReadableBuffer buf); @Override int readableBytes(); @Override int readUnsignedByte(); @Override int readUnsignedMedium(); @Override int readUnsignedShort(); @Override int readInt(); @Override void skipBytes(int length); @Override void readBytes(byte[] dest, int destOffset, int length); @Override void readBytes(ByteBuffer dest); @Override void readBytes(OutputStream dest, int length); @Override ReadableBuffer readBytes(int length); @Override boolean hasArray(); @Override byte[] array(); @Override int arrayOffset(); @Override void close();  }
@Test public void arrayOffset() { when(delegate.arrayOffset()).thenReturn(1); assertEquals(1, buffer.arrayOffset()); }