test_class.declarator: localeHeaderDelegate
test_class.modifier: private
test_class.original_string: private LocaleHeaderDelegate localeHeaderDelegate;
test_class.type: LocaleHeaderDelegate
test_class.var_name: localeHeaderDelegate
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/header/LocaleHeaderDelegateTest.java
test_class.identifier: LocaleHeaderDelegateTest
test_case.body: @UseDataProvider("forTestToString")
      @Test
      public void testToString(Locale locale, String expectedResult) {
          String header = localeHeaderDelegate.toString(locale);
          assertEquals(expectedResult, header);
      }
test_case.class_method_signature: LocaleHeaderDelegateTest.testToString(Locale locale, String expectedResult)
test_case.full_signature: @UseDataProvider("forTestToString") @Test public void testToString(Locale locale, String expectedResult)
test_case.identifier: testToString
test_case.invocations: toString assertEquals
test_case.modifiers: @UseDataProvider("forTestToString") @Test public
test_case.parameters: (Locale locale, String expectedResult)
test_case.return: void
test_case.signature: void testToString(Locale locale, String expectedResult)
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/header/LocaleHeaderDelegate.java
focal_class.identifier: LocaleHeaderDelegate
focal_class.interfaces: implements RuntimeDelegate.HeaderDelegate<Locale>
focal_class.class_method_signature: LocaleHeaderDelegate.fromString(String header)
focal_class.full_signature: @Override public Locale fromString(String header)
focal_class.identifier: fromString
focal_class.modifiers: @Override public
focal_class.parameters: (String header)
focal_class.return: Locale
focal_class.signature: Locale fromString(String header)
focal_class.class_method_signature: LocaleHeaderDelegate.toString(Locale locale)
focal_class.full_signature: @Override public String toString(Locale locale)
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: (Locale locale)
focal_class.return: String
focal_class.signature: String toString(Locale locale)
focal_method.body: @Override
      public String toString(Locale locale) {
          if (locale == null) {
              throw new IllegalArgumentException();
          }
          String language = locale.getLanguage();
          if (language.isEmpty() || "*".equals(language)) {
              return null;
          }
  
          String country = locale.getCountry();
          if (country.isEmpty()) {
              return language.toLowerCase();
          }
  
          return language.toLowerCase() + "-" + country.toLowerCase();
      }
focal_method.class_method_signature: LocaleHeaderDelegate.toString(Locale locale)
focal_method.full_signature: @Override public String toString(Locale locale)
focal_method.identifier: toString
focal_method.invocations: getLanguage isEmpty equals getCountry isEmpty toLowerCase toLowerCase toLowerCase
focal_method.modifiers: @Override public
focal_method.parameters: (Locale locale)
focal_method.return: String
focal_method.signature: String toString(Locale locale)