static void populateAllowCommentAttribute(ITemplateContext context, boolean allowComment) {
        if (Contexts.isWebContext(context)) {
            IWebContext webContext = Contexts.asWebContext(context);
            webContext.getExchange()
                .setAttributeValue(COMMENT_ENABLED_MODEL_ATTRIBUTE, allowComment);
        }
    }
@Test
    void populateAllowCommentAttribute() {
        WebEngineContext webContext = mock(WebEngineContext.class);
        IWebExchange webExchange = mock(IWebExchange.class);
        when(webContext.getExchange()).thenReturn(webExchange);

        CommentEnabledVariableProcessor.populateAllowCommentAttribute(webContext, true);
        verify(webExchange).setAttributeValue(
            eq(CommentEnabledVariableProcessor.COMMENT_ENABLED_MODEL_ATTRIBUTE), eq(true));

        CommentEnabledVariableProcessor.populateAllowCommentAttribute(webContext, false);
        verify(webExchange).setAttributeValue(
            eq(CommentEnabledVariableProcessor.COMMENT_ENABLED_MODEL_ATTRIBUTE), eq(false));
    }