LoggingHandler extends ChannelDuplexHandler { public LogLevel level() { return level; } LoggingHandler();  LoggingHandler(LogLevel level);  LoggingHandler(Class<?> clazz);  LoggingHandler(Class<?> clazz, LogLevel level);  LoggingHandler(String name);  LoggingHandler(String name, LogLevel level); LogLevel level(); @Override void channelRegistered(ChannelHandlerContext ctx); @Override void channelUnregistered(ChannelHandlerContext ctx); @Override void channelActive(ChannelHandlerContext ctx); @Override void channelInactive(ChannelHandlerContext ctx); @Override void exceptionCaught(ChannelHandlerContext ctx, Throwable cause); @Override void userEventTriggered(ChannelHandlerContext ctx, Object evt); @Override void bind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise); @Override void connect(
            ChannelHandlerContext ctx,
            SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise); @Override void disconnect(ChannelHandlerContext ctx, ChannelPromise promise); @Override void close(ChannelHandlerContext ctx, ChannelPromise promise); @Override void deregister(ChannelHandlerContext ctx, ChannelPromise promise); @Override void channelReadComplete(ChannelHandlerContext ctx); @Override void channelRead(ChannelHandlerContext ctx, Object msg); @Override void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise); @Override void channelWritabilityChanged(ChannelHandlerContext ctx); @Override void flush(ChannelHandlerContext ctx);  }
@Test public void shouldApplyCustomLogLevel() { LoggingHandler handler = new LoggingHandler(LogLevel.INFO); assertEquals(LogLevel.INFO, handler.level()); }