FormInterpretationAlgorithm implements FormItemVisitor { public void setJustFilled(final InputItem input) { justFilled.add(input); LOGGER.info("set just_filled flag for '" + input.getName() + "'"); } FormInterpretationAlgorithm(final VoiceXmlInterpreterContext ctx,
            final VoiceXmlInterpreter ip, final Dialog currentDialog); Dialog getDialog(); VoiceXmlInterpreterContext getVoiceXmlInterpreterContext(); TagStrategyExecutor getTagStrategyExecutor(); void initialize(final Profile prof,
            final Map<String, Object> parameters); FormItem getFormItem(final String name); Collection<FormItem> getFormItems(); FormItem getFormItem(); void mainLoop(); void setJustFilled(final InputItem input); boolean isJustFilled(final InputItem input); boolean isQueuingPrompts(); GrammarDocument processGrammar(final Grammar grammar); void visitBlockFormItem(final BlockFormItem block); void visitFieldFormItem(final InputItem field); void visitInitialFormItem(final InitialFormItem initial); void visitObjectFormItem(final ObjectFormItem object); void visitRecordFormItem(final RecordFormItem record); void visitSubdialogFormItem(final SubdialogFormItem subdialog); void visitTransferFormItem(final TransferFormItem transfer); void setReprompt(final boolean on); String getLocalProperty(final String name); void setLocalProperty(final String name, final String value);  }
@Test public void testSetJustFilled() throws Exception { final VoiceXmlDocument document = new VoiceXmlDocument(); final Vxml vxml = document.getVxml(); final Form form = vxml.appendChild(Form.class); final Field field = form.appendChild(Field.class); field.setName("name"); final FieldFormItem item = new FieldFormItem(context, field); final Dialog executableForm = new ExecutablePlainForm(); executableForm.setNode(form); final FormInterpretationAlgorithm fia = new FormInterpretationAlgorithm( context, interpreter, executableForm); Assert.assertFalse(fia.isJustFilled(item)); fia.setJustFilled(item); Assert.assertTrue(fia.isJustFilled(item)); }