test_class.file: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/CountryCodeValidatorTest.java
test_class.identifier: CountryCodeValidatorTest
test_case.body: @Test
      void should_allow_empty_list() {
          assertThat(validate(new ArrayList<>())).isEmpty();
      }
test_case.class_method_signature: CountryCodeValidatorTest.should_allow_empty_list()
test_case.full_signature: @Test void should_allow_empty_list()
test_case.identifier: should_allow_empty_list
test_case.invocations: isEmpty assertThat validate
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_allow_empty_list()
focal_class.declarator: logger = LoggerFactory.getLogger(CountryCodeValidator.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(CountryCodeValidator.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/CountryCodeValidator.java
focal_class.identifier: CountryCodeValidator
focal_class.class_method_signature: CountryCodeValidator.CountryCodeValidator()
focal_class.full_signature: private  CountryCodeValidator()
focal_class.identifier: CountryCodeValidator
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  CountryCodeValidator()
focal_class.class_method_signature: CountryCodeValidator.validate(List<String> countryCodes)
focal_class.full_signature: public static List<String> validate(List<String> countryCodes)
focal_class.identifier: validate
focal_class.modifiers: public static
focal_class.parameters: (List<String> countryCodes)
focal_class.return: List<String>
focal_class.signature: List<String> validate(List<String> countryCodes)
focal_method.body: public static List<String> validate(List<String> countryCodes) {
          List<String> upperCaseCountries = Objects.requireNonNull(countryCodes).stream()
                  .map(String::toUpperCase)
                  .collect(toList());
          List<String> invalidCodes = upperCaseCountries.stream()
                  .filter(s -> CountryCode.getByAlpha2Code(s) == null)
                  .collect(toList());
          if (!invalidCodes.isEmpty()) {
              throw new IllegalArgumentException(
                      "Following elements (" + invalidCodes + ") are not valid ISO 3166-1 alpha-2 country codes");
          }
          List<String> uniqueCountries = upperCaseCountries.stream().distinct().collect(toList());
          if (uniqueCountries.size() < countryCodes.size()) {
              logger.warn("Duplicate items were removed from {}", countryCodes);
          }
          return uniqueCountries;
      }
focal_method.class_method_signature: CountryCodeValidator.validate(List<String> countryCodes)
focal_method.full_signature: public static List<String> validate(List<String> countryCodes)
focal_method.identifier: validate
focal_method.invocations: collect map stream requireNonNull toList collect filter stream getByAlpha2Code toList isEmpty collect distinct stream toList size size warn
focal_method.modifiers: public static
focal_method.parameters: (List<String> countryCodes)
focal_method.return: List<String>
focal_method.signature: List<String> validate(List<String> countryCodes)