private void setup(boolean register, final ChannelHandler... handlers) {
        ObjectUtil.checkNotNull(handlers, "handlers");
        ChannelPipeline p = pipeline();
        p.addLast(new ChannelInitializer<>() {
            @Override
            protected void initChannel(Channel ch) throws Exception {
                ChannelPipeline pipeline = ch.pipeline();
                for (ChannelHandler h : handlers) {
                    if (h == null) {
                        break;
                    }
                    pipeline.addLast(h);
                }
            }
        });
        if (register) {
            ChannelFuture future = loop.register(this);
            assert future.isDone();
        }
    }
Create a new instance with the channel ID set to the given ID and the pipeline
initialized with the specified handlers.

@param channelId the {@link ChannelId} that will be used to identify this channel
@param hasDisconnect {@code false} if this {@link Channel} will delegate {@link #disconnect()}
                     to {@link #close()}, false otherwise.
@param config the {@link ChannelConfig} which will be returned by {@link #config()}.
@param handlers the {@link ChannelHandler}s which will be add in the {@link ChannelPipeline}
plc4j/transports/test/src/main/java/io/netty/channel/embedded/Plc4xEmbeddedChannel.java