@Test public void testConversion() { map.clear(); map.put(LanguageCode.CHECHEN, "Other languages"); map.put(LanguageCode.CHEROKEE, "Cherokee"); map.put(LanguageCode.CHINESE, "Mandarin (Chinese)"); map.put(LanguageCode.ENGLISH, "English"); map.put(LanguageCode.FRENCH, "French"); map.put(LanguageCode.GERMAN, "German"); map.put(LanguageCode.HAWAIIAN, "Other languages"); map.put(LanguageCode.HEBREW, "Hebrew"); map.put(LanguageCode.ITALIAN, "Italian"); map.put(LanguageCode.JAPANESE, "Japanese"); map.put(LanguageCode.KOREAN, "Korean"); map.put(LanguageCode.MOHAWK, "Other languages"); map.put(LanguageCode.MULTIPLE, "Other languages"); map.put(LanguageCode.SPANISH, "Spanish"); map.put(LanguageCode.wrap("something else"), "Other"); List<LanguageCode> languageCodes = new ArrayList<LanguageCode>(); languageCodes.addAll(map.keySet()); LanguageList originalList = new LanguageList(); for (LanguageCode languageCode : languageCodes) { originalList.add(new Language(languageCode)); } List<String> convertedList = converter.convert(originalList); Assert.assertEquals(originalList.size(), convertedList.size()); int i = 0; for (String converted : convertedList) { LanguageCode original = languageCodes.get(i++); Assert.assertEquals(converted, map.get(original)); } }
public List<String> convert(LanguageList languageList) { if (languageList == null) { return null; } return toSliLanguageList(languageList.getLanguages()); }
LanguageListConverter { public List<String> convert(LanguageList languageList) { if (languageList == null) { return null; } return toSliLanguageList(languageList.getLanguages()); } }
LanguageListConverter { public List<String> convert(LanguageList languageList) { if (languageList == null) { return null; } return toSliLanguageList(languageList.getLanguages()); }  }
LanguageListConverter { public List<String> convert(LanguageList languageList) { if (languageList == null) { return null; } return toSliLanguageList(languageList.getLanguages()); }  List<String> convert(LanguageList languageList); }
LanguageListConverter { public List<String> convert(LanguageList languageList) { if (languageList == null) { return null; } return toSliLanguageList(languageList.getLanguages()); }  List<String> convert(LanguageList languageList);  }