@Test
public void testEquals() throws Exception {

    TNodeIf div = new TNodeIf(null, TextContentParserTest.createTestTextContentParser(), "div", TNode.EMPTY_ATTRIBUTES, "{{label}} == 'one'", false);
    final ByteArrayOutputStream out = new ByteArrayOutputStream();
    assertFalse(div.canRender(new TRenderContext(out, Collections.<String, Object>singletonMap("label", "one"))).isPresent());
    assertTrue(div.canRender(new TRenderContext(out, Collections.<String, Object>singletonMap("label", "two"))).isPresent());
    assertTrue(div.canRender(new TRenderContext(out, Collections.<String, Object>emptyMap())).isPresent());
    div = new TNodeIf(null, TextContentParserTest.createTestTextContentParser(), "div", TNode.EMPTY_ATTRIBUTES, "'one' == {{label}}", false);
    assertFalse(div.canRender(new TRenderContext(out, Collections.<String, Object>singletonMap("label", "one"))).isPresent());
    assertTrue(div.canRender(new TRenderContext(out, Collections.<String, Object>singletonMap("label", "two"))).isPresent());
    assertTrue(div.canRender(new TRenderContext(out, Collections.<String, Object>emptyMap())).isPresent());
}