LocalesDetector { int detectMostClosestLocale(Locale locale) { mLogger.debug("Start detecting a close locale to: "); int index = 0; for (Locale loc: LocalesUtils.getLocales()) { if(loc.getDisplayLanguage().equals(locale.getDisplayLanguage())) { mLogger.info("The locale: '" + loc + "' has been detected as a closer locale to: '" + locale + "'"); return index; } index++; } mLogger.debug("No closer locales founded."); return -1; } LocalesDetector(Context context);   }
@Test public void testDetectMostClosestLocale() throws Exception { }