LanguageRegistry { public static Language findLanguageByTerseName(String terseName) { for (Language language : getInstance().languages.values()) { if (language.getTerseName().equals(terseName)) { return language; } } return null; } private  LanguageRegistry(); @Deprecated static LanguageRegistry getInstance(); static Collection<Language> getLanguages(); static Language getLanguage(String languageName); static Language getDefaultLanguage(); static Language findLanguageByTerseName(String terseName); @Deprecated static LanguageVersion findLanguageVersionByTerseName(String terseNameAndVersion); static List<Language> findByExtension(String extension); @Deprecated static List<LanguageVersion> findAllVersions(); @Deprecated static List<Language> findWithRuleSupport(); @Deprecated static String commaSeparatedTerseNamesForLanguage(List<Language> languages); @Deprecated static String commaSeparatedTerseNamesForLanguageVersion(List<LanguageVersion> languageVersions);  }
@Test public void getLanguageVersionByAliasTest() { Language dummy = LanguageRegistry.findLanguageByTerseName("dummy"); LanguageVersion dummy17 = dummy.getVersion("1.7"); Assert.assertNotNull(dummy17); Assert.assertEquals("1.7", dummy17.getVersion()); LanguageVersion dummy7 = dummy.getVersion("7"); Assert.assertNotNull(dummy7); Assert.assertEquals("1.7", dummy17.getVersion()); Assert.assertSame(dummy17, dummy7); }