TemplateRenderer extends Renderer<SOURCE> { static boolean hasClassOrStyleWithoutDollar(String template) { return BINDING_MISSING_DOLLAR.matcher(template).find(); } private  TemplateRenderer(String template); static TemplateRenderer<SOURCE> of(String template); TemplateRenderer<SOURCE> withProperty(String property,
            ValueProvider<SOURCE, ?> provider); TemplateRenderer<SOURCE> withEventHandler(String handlerName,
            SerializableConsumer<SOURCE> handler);  }
@Test public void missingAttributeBindingDetector() { String[] missingDollar = { "<div class='[[item.className]]'>", "<div class = '[[item.className]]'>", "<div class=\"[[item.className]]\">", "<div class=[[item.className]]>", "<div class={{item.className}}>", "<div style='[[item.style]]'>" }; String[] notMissingDollar = { "<div class$='[[item.className]]'>", "<div class$ = [[item.className]]>", "<div style$='[[item.style]]'>", "<div my-style='[[item.style]]'>", "<div className='[[item.className]]'>", "<div class='static list'>", "<div class=((item.not_a_binding))>" }; for (String template : missingDollar) { if (!TemplateRenderer.hasClassOrStyleWithoutDollar(template)) { Assert.fail("Missing dollar should be detected for the string: " + template); } } for (String template : notMissingDollar) { if (TemplateRenderer.hasClassOrStyleWithoutDollar(template)) { Assert.fail( "Missing dollar should not be detected for the string: " + template); } } }