### Question:
TextWidget implements Renderable { public void render(Object bound, Respond respond) { StringBuilder builder = new StringBuilder(); for (Token token : tokenizedTemplate) { builder.append(token.render(bound)); } respond.write(builder.toString()); } TextWidget(String template, EvaluatorCompiler compiler); void render(Object bound, Respond respond); Set<T> collect(Class<T> clazz);  }### Answer:
@Test(dataProvider = NAME_VALUES) public final void renderATemplateWithObject(final String name) throws ExpressionCompileException { final String[] out = new String[1]; Respond respond = createMock(Respond.class); respond.write("Hello " + name); replay(respond); new TextWidget("Hello ${name}", new MvelEvaluatorCompiler(ATestType.class)) .render(new ATestType(name), respond); verify(respond); }
@Test(dataProvider = MVEL_NAMES) public final void renderATemplateWithObjectGraph(final TestBackingType data, String name) throws ExpressionCompileException { final String[] out = new String[1]; Respond respond = createMock(Respond.class); respond.write("Hello " + name); replay(respond); new TextWidget("Hello ${names.first}", new MvelEvaluatorCompiler(TestBackingType.class)) .render(data, respond); verify(respond); }