@Override
    public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
        super.userEventTriggered(ctx, evt);
        if (evt instanceof Http2GoAwayFrame) {
            Http2GoAwayFrame event = (Http2GoAwayFrame) evt;
            ctx.close();
            LOGGER.debug(
                    "Event triggered, event name is: " + event.name() + ", last stream id is: " + event.lastStreamId());
        } else if (evt instanceof Http2ResetFrame) {
            onResetRead(ctx, (Http2ResetFrame) evt);
        }
    }
@Test
    void testUserEventTriggered() throws Exception {
        // test Http2GoAwayFrame
        Http2GoAwayFrame goAwayFrame = new DefaultHttp2GoAwayFrame(
                Http2Error.NO_ERROR, ByteBufUtil.writeAscii(ByteBufAllocator.DEFAULT, "app_requested"));
        handler.userEventTriggered(ctx, goAwayFrame);
        Mockito.verify(ctx, Mockito.times(1)).close();

        // test Http2ResetFrame
        DefaultHttp2ResetFrame resetFrame = new DefaultHttp2ResetFrame(Http2Error.CANCEL);
        handler.userEventTriggered(ctx, resetFrame);
        Mockito.verify(ctx, Mockito.times(2)).close();
    }