SimpleLeakAwareByteBuf extends WrappedByteBuf { @Override public ByteBuf asReadOnly() { return newSharedLeakAwareByteBuf(super.asReadOnly()); } SimpleLeakAwareByteBuf(ByteBuf wrapped, ByteBuf trackedByteBuf, ResourceLeakTracker<ByteBuf> leak);   SimpleLeakAwareByteBuf(ByteBuf wrapped, ResourceLeakTracker<ByteBuf> leak); @Override ByteBuf slice(); @Override ByteBuf retainedSlice(); @Override ByteBuf retainedSlice(int index, int length); @Override ByteBuf retainedDuplicate(); @Override ByteBuf readRetainedSlice(int length); @Override ByteBuf slice(int index, int length); @Override ByteBuf duplicate(); @Override ByteBuf readSlice(int length); @Override ByteBuf asReadOnly(); @Override ByteBuf touch(); @Override ByteBuf touch(Object hint); @Override boolean release(); @Override boolean release(int decrement); @Override ByteBuf order(ByteOrder endianness);  }
@Test public void testWrapReadOnly() { assertWrapped(newBuffer(8).asReadOnly()); }