ScriptStrategy extends AbstractTagStrategy { public void execute(final VoiceXmlInterpreterContext context, final VoiceXmlInterpreter interpreter, final FormInterpretationAlgorithm fia, final FormItem item, final VoiceXmlNode node) throws JVoiceXMLEvent { final String script = node.getTextContent().trim(); if ((script.length() == 0) && (src == null)) { throw new BadFetchError( "Exactly one of \"src\", \"srcexpr\", or an inline script " + "must be specified!"); } final DataModel model = context.getDataModel(); if (src == null) { processInternalScript(script, model); } else { processExternalScript(context, model); } } ScriptStrategy(); Collection<String> getEvalAttributes(); @Override void validateAttributes(final DataModel model); void execute(final VoiceXmlInterpreterContext context,
            final VoiceXmlInterpreter interpreter,
            final FormInterpretationAlgorithm fia, final FormItem item,
            final VoiceXmlNode node);  }
@Test public void testExecute() throws JVoiceXMLEvent, Exception { final VoiceXmlDocument doc = createDocument(); final Vxml vxml = doc.getVxml(); final Script script = vxml.appendChild(Script.class); script.addCdata(SCRIPT); final ScriptStrategy strategy = new ScriptStrategy(); executeTagStrategy(script, strategy); final DataModel model = getDataModel(); Mockito.verify(model).evaluateExpression(SCRIPT, Object.class); }