### Question:
ByteBufItemSource implements ItemSource<ByteBuf> { public void release() { source.clear(); releaseCallback.completed(this); } ByteBufItemSource(ByteBuf source, ReleaseCallback releaseCallback); @Override ByteBuf getSource(); void release(); @Override String toString();  }### Answer:
@Test public void releaseResetsTheSource() { ReleaseCallback callback = mock(ReleaseCallback.class); CompositeByteBuf byteBuf = spy(createDefaultTestByteBuf()); ItemSource source = new ByteBufItemSource(byteBuf, callback); source.release(); verify(byteBuf).clear(); }