@Override
    protected void doProcess(ITemplateContext context, IProcessableElementTag tag,
        IElementTagStructureHandler structureHandler) {
        var commentWidget = (CommentWidget) context.getVariable(
            CommentEnabledVariableProcessor.COMMENT_WIDGET_OBJECT_VARIABLE);
        if (commentWidget == null) {
            structureHandler.replaceWith("", false);
            return;
        }
        commentWidget.render(context, tag, structureHandler);
    }
@Test
    void doProcess() {
        Context context = getContext();

        when(applicationContext.getBean(eq(SystemConfigurableEnvironmentFetcher.class)))
            .thenReturn(environmentFetcher);
        var commentSetting = mock(SystemSetting.Comment.class);
        when(environmentFetcher.fetchComment())
            .thenReturn(Mono.just(commentSetting));
        when(commentSetting.getEnable()).thenReturn(true);

        when(extensionGetter.getEnabledExtensions(eq(CommentWidget.class)))
            .thenReturn(Flux.empty());
        String result = templateEngine.process("commentWidget", context);
        assertThat(result).isEqualTo("""
            <!DOCTYPE html>
            <html lang="en">
              <body>
                <p>comment widget:</p>
               \s
              </body>
            </html>
            """);

        when(extensionGetter.getEnabledExtensions(eq(CommentWidget.class)))
            .thenReturn(Flux.just(new DefaultCommentWidget()));
        result = templateEngine.process("commentWidget", context);
        assertThat(result).isEqualTo("""
            <!DOCTYPE html>
            <html lang="en">
              <body>
                <p>comment widget:</p>
                <p>Comment in default widget</p>
              </body>
            </html>
            """);
    }

    static class DefaultCommentWidget implements CommentWidget {

        @Override
        public void render(ITemplateContext context, IProcessableElementTag tag,
            IElementTagStructureHandler structureHandler) {
            structureHandler.replaceWith("<p>Comment in default widget</p>", false);
        }