LocalesDetector { HashSet<Locale> validateLocales(HashSet<Locale> locales) { mLogger.debug("Validating given locales.."); for (Locale l:LocalesUtils.getPseudoLocales()) { if(locales.remove(l)) { mLogger.info("Pseudo locale '" + l + "' has been removed."); } } HashSet<Locale> cleanLocales = new HashSet<>(); Locale[] androidLocales = Locale.getAvailableLocales(); for (Locale locale: locales) { if (Arrays.asList(androidLocales).contains(locale)) { cleanLocales.add(locale); } else { mLogger.error("Invalid passed locale: " + locale); mLogger.warn("Invalid specified locale: '" + locale + "', has been discarded"); } } mLogger.debug("passing validated locales."); return cleanLocales; } LocalesDetector(Context context);   }
@Test public void testValidateLocales() throws Exception { }