@@ -23,8 +23,9 @@ public void testGetExchangeRate() {
2323 .set (date )
2424 .build ();
2525
26- ExchangeRateProvider compoundRateProvider = MonetaryConversions .getExchangeRateProvider ("ECB" , "ECB-HIST90" );
27- assertNotNull (compoundRateProvider .getExchangeRate (conversionQuery ));
26+ // Need to cast to CompoundRateProvider to access the getExchangeRate method that takes a boolean parameter
27+ CompoundRateProvider compoundRateProvider = (CompoundRateProvider ) MonetaryConversions .getExchangeRateProvider ("ECB" , "ECB-HIST90" );
28+ assertNotNull (compoundRateProvider .getExchangeRate (conversionQuery , false ));
2829 }
2930
3031 @ Test
@@ -38,8 +39,9 @@ public void testGetExchangeRateAllProvidersFail() {
3839 .set (date )
3940 .build ();
4041
41- ExchangeRateProvider compoundRateProvider = MonetaryConversions .getExchangeRateProvider ("ECB" , "IMF" );
42- assertThrows (CurrencyConversionException .class , () -> compoundRateProvider .getExchangeRate (conversionQuery ));
42+ // Need to cast to CompoundRateProvider to access the getExchangeRate method that takes a boolean parameter
43+ CompoundRateProvider compoundRateProvider = (CompoundRateProvider ) MonetaryConversions .getExchangeRateProvider ("ECB" , "IMF" );
44+ assertThrows (CurrencyConversionException .class , () -> compoundRateProvider .getExchangeRate (conversionQuery , false ));
4345 }
4446
4547 @ Test
@@ -53,9 +55,8 @@ public void testGetExchangeRateFailingFast() {
5355 .set (date )
5456 .build ();
5557
56- // Need to cast to CompoundRateProvider to access the getExchangeRate method that takes a boolean parameter
57- CompoundRateProvider compoundRateProvider = (CompoundRateProvider ) MonetaryConversions .getExchangeRateProvider ("ECB" , "ECB-HIST90" );
58- assertThrows (CurrencyConversionException .class , () -> compoundRateProvider .getExchangeRate (conversionQuery , true ));
58+ ExchangeRateProvider compoundRateProvider = MonetaryConversions .getExchangeRateProvider ("ECB" , "ECB-HIST90" );
59+ assertThrows (CurrencyConversionException .class , () -> compoundRateProvider .getExchangeRate (conversionQuery ));
5960 }
6061
6162 private LocalDate lastWeekTuesday () {
0 commit comments