Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
Fix a unit test that failed after a few related classes were refactored.
  • Loading branch information
cd2357 committed May 9, 2020
1 parent 9f7eca2 commit 45636f1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private void doSanityChecksForRetrievedData(Map<String, Object> retrievedData, l
*/
private BitcoinFeeRateProvider buildDummyReachableBitcoinFeeRateProvider(long feeRate) {
GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
BitcoinFeeRateProvider dummyProvider = new BitcoinFeeRateProvider(ctx.getEnvironment()) {
BitcoinFeeRateProvider dummyProvider = new BitcoinFeeRateProvider.First(ctx.getEnvironment()) {
@Override
protected FeeRate doGet() {
return new FeeRate("BTC", feeRate, Instant.now().getEpochSecond());
Expand All @@ -136,7 +136,7 @@ protected FeeRate doGet() {
*/
private BitcoinFeeRateProvider buildDummyUnreachableBitcoinFeeRateProvider() throws RestClientException{
GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
BitcoinFeeRateProvider dummyProvider = new BitcoinFeeRateProvider(ctx.getEnvironment()) {
BitcoinFeeRateProvider dummyProvider = new BitcoinFeeRateProvider.First(ctx.getEnvironment()) {
@Override
protected FeeRate doGet() {
throw new RestClientException("Simulating connection error when trying to reach API endpoint");
Expand Down

0 comments on commit 45636f1

Please sign in to comment.