@Test
public void testRelease() {

    byte[] bytes1 = "hello".getBytes();
    byte[] bytes2 = "hello".getBytes();
    ByteBuf buf1 = Unpooled.wrappedBuffer(bytes1);
    ByteBuf buf2 = Unpooled.wrappedBuffer(bytes2);
    ByteBuf[] bufs = new ByteBuf[] {buf1, buf2};
    DynamicCompositeByteBuf compositeByteBuf = new DynamicCompositeByteBuf(bufs, 0, 2);
    Assert.assertTrue(buf1.refCnt() == 1);
    Assert.assertTrue(buf2.refCnt() == 1);
    compositeByteBuf.release();
    Assert.assertTrue(buf1.refCnt() == 0);
    Assert.assertTrue(buf2.refCnt() == 0);
}