### Question:
PhoneNumberUtils { @NonNull static CountryInfo getCurrentCountryInfo(@NonNull Context context) { Locale locale = getSimBasedLocale(context); if (locale == null) { locale = getOSLocale(); } if (locale == null) { return DEFAULT_COUNTRY; } Integer countryCode = PhoneNumberUtils.getCountryCode(locale.getCountry()); return countryCode == null ? DEFAULT_COUNTRY : new CountryInfo(locale, countryCode); }  @Nullable static Integer getCountryCode(String countryIso);  }### Answer:
@Test public void testGetCurrentCountryInfo_fromSim() { Context context = mock(Context.class); TelephonyManager telephonyManager = mock(TelephonyManager.class); when(context.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(telephonyManager); when(telephonyManager.getSimCountryIso()).thenReturn("IN"); assertEquals(new CountryInfo(new Locale("", "IN"), 91), getCurrentCountryInfo(context)); }