FieldFormItem extends AbstractGrammarContainer { public String getSlot() { final Field field = getField(); final String slot = field.getSlot(); if (slot != null) { return slot; } return field.getName(); } FieldFormItem();  FieldFormItem(final VoiceXmlInterpreterContext context,
            final VoiceXmlNode voiceNode); @Override AbstractFormItem newInstance(final VoiceXmlInterpreterContext ctx,
            final VoiceXmlNode voiceNode); void setOptionConverter(final OptionConverter optionConverter); void accept(final FormItemVisitor visitor); int setFormItemVariable(final RecognitionResult result); int setFormItemVariable(final String utterance); @Override int setFormItemVariable(final Object value); String getSlot(); boolean isModal();  }
@Test public void testGetSlot() throws Exception { final VoiceXmlDocument document1 = new VoiceXmlDocument(); final Vxml vxml1 = document1.getVxml(); final Form form1 = vxml1.appendChild(Form.class); final Field field1 = form1.appendChild(Field.class); field1.setName("lo_fat_meal"); final FieldFormItem item1 = new FieldFormItem(context, field1); Assert.assertEquals(field1.getName(), item1.getSlot()); final VoiceXmlDocument document2 = new VoiceXmlDocument(); final Vxml vxml2 = document2.getVxml(); final Form form2 = vxml2.appendChild(Form.class); final Field field2 = form2.appendChild(Field.class); field2.setName("lo_fat_meal"); field2.setSlot("meal"); final FieldFormItem item2 = new FieldFormItem(context, field2); Assert.assertEquals(field2.getSlot(), item2.getSlot()); }