JVoiceXmlRecognizerModeDescFactory implements RecognizerModeDescFactory { public void setLocale(final Locale loc) { locale = loc; }  RecognizerModeDesc createDescriptor(); void setEngineName(final String name); void setLocale(final Locale loc); void setModeName(final String name);  }
@Test public void testSetLocale() { final JVoiceXmlRecognizerModeDescFactory desc1 = new JVoiceXmlRecognizerModeDescFactory(); final Locale locale = Locale.US; desc1.setLocale(locale); final RecognizerModeDesc refDescriptor1 = new RecognizerModeDesc(null, null, locale, null, null, null); Assert.assertEquals(refDescriptor1, desc1.createDescriptor()); final JVoiceXmlRecognizerModeDescFactory desc2 = new JVoiceXmlRecognizerModeDescFactory(); final RecognizerModeDesc refDescriptor2 = new RecognizerModeDesc(null, null, null, null, null, null); Assert.assertEquals(refDescriptor2, desc2.createDescriptor()); }