@Test
@Config(sdk = Config.ALL_SDKS)
public void normalizeLanguageCode_macrolanguageTags_areFullyMaintained() {

  // See https://en.wikipedia.org/wiki/ISO_639_macrolanguage
  assertThat(Util.normalizeLanguageCode("zh-cmn")).isEqualTo("zh-cmn");
  assertThat(Util.normalizeLanguageCode("zho-cmn")).isEqualTo("zh-cmn");
  assertThat(Util.normalizeLanguageCode("ar-ayl")).isEqualTo("ar-ayl");
  assertThat(Util.normalizeLanguageCode("ara-ayl")).isEqualTo("ar-ayl");
  // Special case of short codes that are actually part of a macrolanguage.
  assertThat(Util.normalizeLanguageCode("nb")).isEqualTo("no-nob");
  assertThat(Util.normalizeLanguageCode("nn")).isEqualTo("no-nno");
  assertThat(Util.normalizeLanguageCode("nob")).isEqualTo("no-nob");
  assertThat(Util.normalizeLanguageCode("nno")).isEqualTo("no-nno");
  assertThat(Util.normalizeLanguageCode("tw")).isEqualTo("ak-twi");
  assertThat(Util.normalizeLanguageCode("twi")).isEqualTo("ak-twi");
  assertThat(Util.normalizeLanguageCode("bs")).isEqualTo("hbs-bos");
  assertThat(Util.normalizeLanguageCode("bos")).isEqualTo("hbs-bos");
  assertThat(Util.normalizeLanguageCode("hr")).isEqualTo("hbs-hrv");
  assertThat(Util.normalizeLanguageCode("hrv")).isEqualTo("hbs-hrv");
  assertThat(Util.normalizeLanguageCode("sr")).isEqualTo("hbs-srp");
  assertThat(Util.normalizeLanguageCode("srp")).isEqualTo("hbs-srp");
  assertThat(Util.normalizeLanguageCode("id")).isEqualTo("ms-ind");
  assertThat(Util.normalizeLanguageCode("ind")).isEqualTo("ms-ind");
  assertThat(Util.normalizeLanguageCode("cmn")).isEqualTo("zh-cmn");
  assertThat(Util.normalizeLanguageCode("hak")).isEqualTo("zh-hak");
  assertThat(Util.normalizeLanguageCode("nan")).isEqualTo("zh-nan");
  assertThat(Util.normalizeLanguageCode("hsn")).isEqualTo("zh-hsn");
}