Lang extends SubtagSet { public Locale getLocale() { return locale; } Lang();  Lang(Locale locale);  Lang(String lang);   Lang(Subtag primary); Subtag getLanguage(); Locale getLocale(); Subtag getExtLang(); Subtag getScript(); Subtag getRegion(); Subtag getVariant(); Subtag getExtension(); Subtag getPrivateUse(); Range asRange(); Lang clone(); Lang canonicalize(); boolean isDeprecated(); Lang getParent(); boolean isChildOf(Lang lang); boolean isParentOf(Lang lang); static Lang parse(String lang); static String fromLocale(Locale locale);  }
@Test public void testLangLocale() { Lang lang = new Lang(new Locale("fr", "CA")); assertEquals(lang.getLocale(), new Locale("fr", "CA")); lang = new Lang(new Locale("ab", "CDEFGHIJKLMNOPQ")); assertFalse(lang.isValid()); }
@Test public void testGetLocale() { Lang lang = new Lang("en-US"); assertEquals(Locale.US, lang.getLocale()); }