public static ChannelBuffer dynamicBuffer() {
        return dynamicBuffer(DEFAULT_CAPACITY);
    }
@Test
    void testDynamicBuffer() {
        ChannelBuffer channelBuffer = ChannelBuffers.dynamicBuffer();
        Assertions.assertTrue(channelBuffer instanceof DynamicChannelBuffer);
        Assertions.assertEquals(channelBuffer.capacity(), DEFAULT_CAPACITY);

        channelBuffer = ChannelBuffers.dynamicBuffer(32, DirectChannelBufferFactory.getInstance());
        Assertions.assertTrue(channelBuffer instanceof DynamicChannelBuffer);
        Assertions.assertTrue(channelBuffer.isDirect());
        Assertions.assertEquals(channelBuffer.capacity(), 32);
    }