@Test
public void testCommentWhenFalse() throws Exception {

    TNodeIf ifNode = new TNodeIf(info, TextContentParserTest.createTestTextContentParser(), "div", TNode.EMPTY_ATTRIBUTES, "item", false);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    ifNode.render(new TRenderContext(out, Collections.<String, Object>emptyMap()));
    assertEquals("<!-- fmt-if=item is null -->", out.toString());
    out = new ByteArrayOutputStream();
    ifNode.render(new TRenderContext(out, Collections.<String, Object>singletonMap("item", false)));
    assertEquals("<!-- fmt-if=item is false -->", out.toString());
    out = new ByteArrayOutputStream();
    ifNode.render(new TRenderContext(out, Collections.<String, Object>singletonMap("item", Collections.emptyList())));
    assertEquals("<!-- fmt-if=item is empty -->", out.toString());
    out = new ByteArrayOutputStream();
    ifNode.render(new TRenderContext(out, Collections.<String, Object>singletonMap("item", Collections.emptyMap())));
    assertEquals("<!-- fmt-if=item is empty -->", out.toString());
    out = new ByteArrayOutputStream();
    ifNode.render(new TRenderContext(out, Collections.<String, Object>singletonMap("item", 0)));
    assertEquals("<!-- fmt-if=item is 0 -->", out.toString());
    out = new ByteArrayOutputStream();
    ifNode.render(new TRenderContext(out, Collections.<String, Object>singletonMap("item", 0.0)));
    assertEquals("<!-- fmt-if=item is 0 -->", out.toString());
    out = new ByteArrayOutputStream();
    ifNode.render(new TRenderContext(out, Collections.<String, Object>singletonMap("item", "")));
    assertEquals("<!-- fmt-if=item is empty -->", out.toString());
    ifNode = new TNodeIf(info, TextContentParserTest.createTestTextContentParser(), "div", TNode.EMPTY_ATTRIBUTES, "!item", false);
    out = new ByteArrayOutputStream();
    ifNode.render(new TRenderContext(out, Collections.<String, Object>singletonMap("item", "blarg")));
    assertEquals("<!-- fmt-if=!item is false (item is true) -->", out.toString());
}