### Question:
AbstractLangData extends RecordData<Lang> { protected static <T extends AbstractLangData> List<T> getAllByLanguageCode(String inLanguageISOCode, Collection<T> inLangData) { final ArrayList<T> theList = new ArrayList<T>(); for (final T theLang : inLangData) { if (theLang.isoCodePattern.matcher(inLanguageISOCode).matches()) { theList.add(theLang); } } return theList; } AbstractLangData(Lang inLang); long getLang_id(); long getId(); String getLang_title(); String getLang_iso_code(); long getLang_type(); Lang getReference(); static boolean isLanguageCodeValid(String inLanguageISOCode);  }### Answer:
@Test public void findAllByLanguageCodeTest() { List<TtsLangData> theLangs = AbstractLangData.getAllByLanguageCode("fr", TtsLangData.getAllTtsLanguages()); Assert.assertEquals(3, theLangs.size()); Assert.assertTrue(theLangs.contains(TtsLangData.findByISOCode("fr-FR"))); Assert.assertTrue(theLangs.contains(TtsLangData.findByISOCode("fr-CA"))); Assert.assertTrue(theLangs.contains(TtsLangData.findByISOCode("fr-BE"))); theLangs = AbstractLangData.getAllByLanguageCode("sv-se", TtsLangData.getAllTtsLanguages()); Assert.assertEquals(1, theLangs.size()); Assert.assertTrue(theLangs.contains(TtsLangData.findByISOCode("sv-SE"))); theLangs = AbstractLangData.getAllByLanguageCode("sv-RE", TtsLangData.getAllTtsLanguages()); Assert.assertTrue(theLangs.isEmpty()); }