DisconnectStrategy extends AbstractTagStrategy { public void execute(final VoiceXmlInterpreterContext context, final VoiceXmlInterpreter interpreter, final FormInterpretationAlgorithm fia, final FormItem item, final VoiceXmlNode node) throws JVoiceXMLEvent { if (LOGGER.isDebugEnabled()) { LOGGER.debug("disconnecting..."); } interpreter.enterFinalProcessingState(); throw new ConnectionDisconnectHangupEvent(); } DisconnectStrategy(); Collection<String> getEvalAttributes(); void execute(final VoiceXmlInterpreterContext context,
                        final VoiceXmlInterpreter interpreter,
                        final FormInterpretationAlgorithm fia,
                        final FormItem item,
                        final VoiceXmlNode node);  }
@Test public void testExecute() throws Exception, JVoiceXMLEvent { final Block block = createBlock(); final Disconnect disconnect = block.appendChild(Disconnect.class); final VoiceXmlInterpreter interpreter = getInterpreter(); Assert.assertFalse(interpreter.isInFinalProcessingState()); final DisconnectStrategy strategy = new DisconnectStrategy(); ConnectionDisconnectHangupEvent event = null; try { executeTagStrategy(disconnect, strategy); } catch (ConnectionDisconnectHangupEvent e) { event = e; } Assert.assertNotNull(event); Assert.assertTrue(interpreter.isInFinalProcessingState()); }