MaryConfig { public List<String> getList(String propertyName) { String val = props.getProperty(propertyName); if (val == null) return new ArrayList<String>(); return Arrays.asList(StringUtils.split(val)); } protected  MaryConfig(InputStream propertyStream); static void checkConsistency(); static int countConfigs(); static int countLanguageConfigs(); static int countVoiceConfigs(); static MaryConfig getMainConfig(); static Iterable<LanguageConfig> getLanguageConfigs(); static Iterable<VoiceConfig> getVoiceConfigs(); static LanguageConfig getLanguageConfig(Locale locale); static VoiceConfig getVoiceConfig(String voiceName); static Iterable<MaryConfig> getConfigs(); static AllophoneSet getAllophoneSet(Locale locale); boolean isMainConfig(); boolean isLanguageConfig(); boolean isVoiceConfig(); Properties getProperties(); PropertiesAccessor getPropertiesAccessor(boolean systemPropertiesOverride); String getProperty(String property, String defaultValue); List<String> getList(String propertyName);  }
@Test public void testGetList() throws MaryConfigurationException, IOException { Properties p = new Properties(); p.setProperty("locale", "en"); p.setProperty("testlist", "a b c"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); p.store(baos, ""); LanguageConfig lc = new LanguageConfig(new ByteArrayInputStream(baos.toByteArray())); List<String> theList = lc.getList("testlist"); assertNotNull(theList); assertEquals(3, theList.size()); Iterator<String> it = theList.iterator(); assertEquals("a", it.next()); assertEquals("b", it.next()); assertEquals("c", it.next()); }