test_class.file: trading-common/src/test/java/fr/ymanvieu/trading/common/symbol/util/CurrencyUtilsTest.java
test_class.identifier: CurrencyUtilsTest
test_case.body: @Test
  	public void testCountryFlagForCurrency() {
  		assertThat(CurrencyUtils.countryFlagForCurrency(USD)).isEqualTo("us");
  		assertThat(CurrencyUtils.countryFlagForCurrency(EUR)).isEqualTo("europeanunion");
  		assertThat(CurrencyUtils.countryFlagForCurrency("RUB")).isEqualTo("ru");
  		assertThat(CurrencyUtils.countryFlagForCurrency(GBP)).isEqualTo("gb");
  		assertThat(CurrencyUtils.countryFlagForCurrency(CHF)).isEqualTo("ch");
  		assertThat(CurrencyUtils.countryFlagForCurrency("XAU")).isEqualTo("gold");
  		assertThat(CurrencyUtils.countryFlagForCurrency("TOTO")).isNull();
  	}
test_case.class_method_signature: CurrencyUtilsTest.testCountryFlagForCurrency()
test_case.full_signature: @Test public void testCountryFlagForCurrency()
test_case.identifier: testCountryFlagForCurrency
test_case.invocations: isEqualTo assertThat countryFlagForCurrency isEqualTo assertThat countryFlagForCurrency isEqualTo assertThat countryFlagForCurrency isEqualTo assertThat countryFlagForCurrency isEqualTo assertThat countryFlagForCurrency isEqualTo assertThat countryFlagForCurrency isNull assertThat countryFlagForCurrency
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCountryFlagForCurrency()
focal_class.declarator: EUR = "EUR"
focal_class.modifier: public static final
focal_class.original_string: public static final String EUR = "EUR";
focal_class.type: String
focal_class.var_name: EUR
focal_class.declarator: USD = "USD"
focal_class.modifier: public static final
focal_class.original_string: public static final String USD = "USD";
focal_class.type: String
focal_class.var_name: USD
focal_class.declarator: GBP = "GBP"
focal_class.modifier: public static final
focal_class.original_string: public static final String GBP = "GBP";
focal_class.type: String
focal_class.var_name: GBP
focal_class.declarator: CHF = "CHF"
focal_class.modifier: public static final
focal_class.original_string: public static final String CHF = "CHF";
focal_class.type: String
focal_class.var_name: CHF
focal_class.declarator: COMMODITIES = new HashMap<>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<String, String> COMMODITIES = new HashMap<>();
focal_class.type: Map<String, String>
focal_class.var_name: COMMODITIES
focal_class.file: trading-common/src/main/java/fr/ymanvieu/trading/common/symbol/util/CurrencyUtils.java
focal_class.identifier: CurrencyUtils
focal_class.class_method_signature: CurrencyUtils.countryCodesForCurrency(String currency)
focal_class.full_signature: private static List<String> countryCodesForCurrency(String currency)
focal_class.identifier: countryCodesForCurrency
focal_class.modifiers: private static
focal_class.parameters: (String currency)
focal_class.return: List<String>
focal_class.signature: List<String> countryCodesForCurrency(String currency)
focal_class.class_method_signature: CurrencyUtils.currencyFromCode(String currency)
focal_class.full_signature: private static Currency currencyFromCode(String currency)
focal_class.identifier: currencyFromCode
focal_class.modifiers: private static
focal_class.parameters: (String currency)
focal_class.return: Currency
focal_class.signature: Currency currencyFromCode(String currency)
focal_class.class_method_signature: CurrencyUtils.countryFlagForCurrency(String c)
focal_class.full_signature: public static String countryFlagForCurrency(String c)
focal_class.identifier: countryFlagForCurrency
focal_class.modifiers: public static
focal_class.parameters: (String c)
focal_class.return: String
focal_class.signature: String countryFlagForCurrency(String c)
focal_class.class_method_signature: CurrencyUtils.nameForCurrency(String currency)
focal_class.full_signature: public static String nameForCurrency(String currency)
focal_class.identifier: nameForCurrency
focal_class.modifiers: public static
focal_class.parameters: (String currency)
focal_class.return: String
focal_class.signature: String nameForCurrency(String currency)
focal_method.body: public static String countryFlagForCurrency(String c) {
  		if (EUR.equals(c)) {
  			return "europeanunion";
  		} else if (USD.equals(c)) {
  			return "us";
  		}
  
  		String commodityCode = COMMODITIES.get(c);
  
  		if (commodityCode != null) {
  			return commodityCode;
  		}
  
  		List<String> codes = countryCodesForCurrency(c);
  
  		if (!codes.isEmpty()) {
  			Collections.sort(codes);
  			String code = codes.get(0);
  			return code.toLowerCase();
  		}
  
  		return null;
  	}
focal_method.class_method_signature: CurrencyUtils.countryFlagForCurrency(String c)
focal_method.full_signature: public static String countryFlagForCurrency(String c)
focal_method.identifier: countryFlagForCurrency
focal_method.invocations: equals equals get countryCodesForCurrency isEmpty sort get toLowerCase
focal_method.modifiers: public static
focal_method.parameters: (String c)
focal_method.return: String
focal_method.signature: String countryFlagForCurrency(String c)