### Question:
LocaleUtility implements GlobalPropertyListener { public static boolean areCompatible(Locale lhs, Locale rhs) { return lhs.equals(rhs) || (("".equals(lhs.getCountry())) || ("".equals(rhs.getCountry()))) && lhs.getLanguage() .equals(rhs.getLanguage()); }  static Locale getDefaultLocale(); static boolean areCompatible(Locale lhs, Locale rhs); static Locale fromSpecification(String localeSpecification); static Set<Locale> getLocalesInOrder(); static void setDefaultLocaleCache(Locale defaultLocaleCache); static void setLocalesAllowedListCache(List<Locale> localesAllowedListCache); @Override void globalPropertyChanged(GlobalProperty newValue); @Override void globalPropertyDeleted(String propertyName); @Override boolean supportsPropertyName(String propertyName); static boolean isValid(Locale locale);  }### Answer:
@Test public void areCompatible_shouldConfirmMatchingLanguageAsCompatible() { Locale lhs = Locale.ENGLISH; Locale rhs = Locale.ENGLISH; assertTrue(LocaleUtility.areCompatible(lhs, rhs)); }
@Test public void areCompatible_shouldNotConfirmDifferentLanguageAsCompatible() { Locale lhs = Locale.ENGLISH; Locale rhs = Locale.FRENCH; assertFalse(LocaleUtility.areCompatible(lhs, rhs)); }
@Test public void areCompatible_shouldConfirmMatchingCountryAsCompatible() { Locale lhs = Locale.US; Locale rhs = Locale.US; assertTrue(LocaleUtility.areCompatible(lhs, rhs)); }
@Test public void areCompatible_shouldNotConfirmDifferentCountryAsCompatible() { Locale lhs = Locale.US; Locale rhs = Locale.UK; assertFalse(LocaleUtility.areCompatible(lhs, rhs)); }
@Test public void areCompatible_shouldConfirmSameLanguageMissingCountryAsCompatible() { Locale lhs = Locale.US; Locale rhs = Locale.ENGLISH; assertTrue(LocaleUtility.areCompatible(lhs, rhs)); }
@Test public void areCompatible_shouldConfirmDifferentLanguageMissingCountryAsCompatible() { Locale lhs = Locale.US; Locale rhs = Locale.FRENCH; assertFalse(LocaleUtility.areCompatible(lhs, rhs)); }