### Question:
ValueOfPlugin extends WebHarvestPlugin { public Variable executePlugin(DynamicScopeContext context) { final String expression = getAttributes().get(ATTR_EXPRESSION); setProperty("Expression", expression); return BaseTemplater.evaluateToVariable(expression, null, context); }  Variable executePlugin(DynamicScopeContext context);  }### Answer:
@Test public void testExecutePlugin() throws Exception { contextMock.returns( asList(new KeyValuePair("name", new NodeVariable("World"))).iterator()). iterator(); ReflectionAssert.assertReflectionEquals( new NodeVariable("Hello, World!"), createPlugin(XmlNodeTestUtils.createXmlNode( "<value-of expr='Hello, ${name}!'/>", XmlNodeTestUtils.NAMESPACE_21), ValueOfPlugin.class).executePlugin(contextMock.getMock())); }
@Test public void testExecutePlugin_preserveVarType() throws Exception { final ListVariable listVar = new ListVariable(Arrays.asList(1, 2, 3)); contextMock.returns( asList(new KeyValuePair("list", listVar)).iterator()). iterator(); ReflectionAssert.assertReflectionEquals(listVar, createPlugin( XmlNodeTestUtils.createXmlNode("<value-of expr='${list}'/>", XmlNodeTestUtils.NAMESPACE_21), ValueOfPlugin.class).executePlugin(contextMock.getMock())); }