LanguageUtils { public static String[] getLanguageVariants(String s, Language... languages) { String[] result = new String[languages.length + 1]; result[languages.length] = s; for (int i = 0; i < languages.length; i++) { Language language = languages[i]; result[i] = getLanguageVariant(s, language); } return result; } private  LanguageUtils(); static Language getLanguage(Locale locale); static Language getLanguage(String languageCode); static LocalizableContent<String> addDescriptions(Node configuration,
      String tagName, Language defaultLanguage, LocalizableContent<String> o,
      boolean escape); static LocalizableContent<String> addDescriptions(Node configuration,
      String tagName, Language defaultLanguage, LocalizableContent<String> o,
      boolean escape, XPath xpath); static String getLanguageVariant(String s, Language language); static String[] getLanguageVariants(String s, Language... languages); static String getBaseVersion(String s); static Language extractLanguage(String s); static Language getPreferredLanguage(Set<Language> choices,
      HttpServletRequest request); static Language getPreferredLanguage(Localizable localizable,
      HttpServletRequest request, Site site); static Language getPreferredContentLanguage(Resource<?> resource,
      HttpServletRequest request, Site site); static Language getPreferredLanguage(HttpServletRequest request,
      Site site); static Language getPreferredLanguage(Localizable localizable,
      Language... languages); static Language getPreferredContentLanguage(Resource<?> resource,
      Language... languages);  }
@Test public void testGetLanguageVariantsStringLanguageArray() { Language[] languages = new Language[] { english, french }; String[] result = LanguageUtils.getLanguageVariants("test.jsp", languages); assertEquals(3, result.length); assertEquals("test_en.jsp", result[0]); assertEquals("test_fr.jsp", result[1]); assertEquals("test.jsp", result[2]); }