### Question:
ByteBufList extends AbstractReferenceCounted { public static ByteBufList get(ByteBuf b1, ByteBuf b2) { ByteBufList buf = get(); buf.add(b1); buf.add(b2); return buf; } private  ByteBufList(Handle<ByteBufList> recyclerHandle); static ByteBufList get(ByteBuf b1, ByteBuf b2); static ByteBufList get(ByteBuf b1); static ByteBufList clone(ByteBufList other); void add(ByteBuf buf); void prepend(ByteBuf buf); int readableBytes(); ByteBuf getBuffer(int index); int size(); int getBytes(byte[] dst); byte[] toArray(); boolean hasArray(); byte[] array(); int arrayOffset(); @VisibleForTesting static ByteBuf coalesce(ByteBufList list); @Override ByteBufList retain(); @Override ReferenceCounted touch(Object hint); static final Encoder ENCODER; static final Encoder ENCODER_WITH_SIZE; }### Answer:
@Test public void testEncoder() throws Exception { ByteBuf b1 = PooledByteBufAllocator.DEFAULT.heapBuffer(128, 128); b1.writerIndex(b1.capacity()); ByteBuf b2 = PooledByteBufAllocator.DEFAULT.heapBuffer(128, 128); b2.writerIndex(b2.capacity()); ByteBufList buf = ByteBufList.get(b1, b2); ChannelHandlerContext ctx = new MockChannelHandlerContext(); ByteBufList.ENCODER.write(ctx, buf, null); assertEquals(buf.refCnt(), 0); assertEquals(b1.refCnt(), 0); assertEquals(b2.refCnt(), 0); }