11/*
2- * Copyright 2023-2023 IEXEC BLOCKCHAIN TECH
2+ * Copyright 2023-2024 IEXEC BLOCKCHAIN TECH
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1919import com .iexec .common .contribution .Contribution ;
2020import com .iexec .commons .poco .chain .*;
2121import com .iexec .commons .poco .contract .generated .IexecHubContract ;
22- import com .iexec .worker .config .BlockchainAdapterConfigurationService ;
22+ import com .iexec .worker .config .ConfigServerConfigurationService ;
2323import lombok .extern .slf4j .Slf4j ;
2424import org .junit .jupiter .api .BeforeEach ;
2525import org .junit .jupiter .api .Test ;
@@ -55,7 +55,7 @@ class IexecHubServiceTests {
5555 private static final String CHAIN_TASK_ID = "0x5125c4ca7176e40d8c5386072a6f262029609a5d3a896fbf592cd965e65098d9" ;
5656
5757 @ Mock
58- private BlockchainAdapterConfigurationService blockchainAdapterConfigurationService ;
58+ private ConfigServerConfigurationService configServerConfigurationService ;
5959 @ Mock
6060 private CredentialsService credentialsService ;
6161 @ Mock
@@ -72,13 +72,13 @@ class IexecHubServiceTests {
7272 @ BeforeEach
7373 void init () throws Exception {
7474 MockitoAnnotations .openMocks (this );
75- when (blockchainAdapterConfigurationService .getIexecHubContractAddress ()).thenReturn ("0x748e091bf16048cb5103E0E10F9D5a8b7fBDd860" );
76- when (blockchainAdapterConfigurationService .getBlockTime ()).thenReturn (Duration .ofSeconds (5L ));
77- when (blockchainAdapterConfigurationService .getChainId ()).thenReturn (65535 );
75+ when (configServerConfigurationService .getIexecHubContractAddress ()).thenReturn ("0x748e091bf16048cb5103E0E10F9D5a8b7fBDd860" );
76+ when (configServerConfigurationService .getBlockTime ()).thenReturn (Duration .ofSeconds (5L ));
77+ when (configServerConfigurationService .getChainId ()).thenReturn (65535 );
7878 credentials = Credentials .create (Keys .createEcKeyPair ());
7979 when (credentialsService .getCredentials ()).thenReturn (credentials );
8080 when (web3jService .getWeb3j ()).thenReturn (web3jClient );
81- iexecHubService = spy (new IexecHubService (credentialsService , web3jService , blockchainAdapterConfigurationService ));
81+ iexecHubService = spy (new IexecHubService (credentialsService , web3jService , configServerConfigurationService ));
8282 ReflectionTestUtils .setField (iexecHubService , "iexecHubContract" , iexecHubContract );
8383 }
8484
0 commit comments