test_class.declarator: COMMON_LOCALES = Arrays.asList(Locale.CANADA, Locale.CANADA_FRENCH, Locale.CHINA, Locale.ENGLISH, Locale.GERMANY, Locale.FRANCE)
test_class.modifier: private static
test_class.original_string: private static List<Locale> COMMON_LOCALES = Arrays.asList(Locale.CANADA, Locale.CANADA_FRENCH, Locale.CHINA, Locale.ENGLISH, Locale.GERMANY, Locale.FRANCE);
test_class.type: List<Locale>
test_class.var_name: COMMON_LOCALES
test_class.file: handlebars/src/test/java/com/github/jknack/handlebars/internal/LocalesTest.java
test_class.identifier: LocalesTest
test_case.body: @Test
    public void testHyphen() {
      for (Locale l : COMMON_LOCALES) {
        // l.toLanguageTag() returns format de-DE
        assertEquals(l, Locales.fromString(l.toLanguageTag()));
      }
    }
test_case.class_method_signature: LocalesTest.testHyphen()
test_case.full_signature: @Test public void testHyphen()
test_case.identifier: testHyphen
test_case.invocations: assertEquals fromString toLanguageTag
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHyphen()
focal_class.file: handlebars/src/main/java/com/github/jknack/handlebars/internal/Locales.java
focal_class.identifier: Locales
focal_class.class_method_signature: Locales.Locales()
focal_class.full_signature: private  Locales()
focal_class.identifier: Locales
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Locales()
focal_class.class_method_signature: Locales.fromString(final String string)
focal_class.full_signature: public static Locale fromString(final String string)
focal_class.identifier: fromString
focal_class.modifiers: public static
focal_class.parameters: (final String string)
focal_class.return: Locale
focal_class.signature: Locale fromString(final String string)
focal_method.body: public static Locale fromString(final String string) {
      if (string == null) {
        return null;
      } else {
        try {
          /*
           *  prefer https://en.wikipedia.org/wiki/IETF_language_tag
           *  (only Locale.Builder throws exception for illegal format)
           */
          return new Locale.Builder().setLanguageTag(string).build();
        } catch (final IllformedLocaleException ex) {
          // use fallback
          return LocaleUtils.toLocale(string);
        }
      }
    }
focal_method.class_method_signature: Locales.fromString(final String string)
focal_method.full_signature: public static Locale fromString(final String string)
focal_method.identifier: fromString
focal_method.invocations: build setLanguageTag toLocale
focal_method.modifiers: public static
focal_method.parameters: (final String string)
focal_method.return: Locale
focal_method.signature: Locale fromString(final String string)