use of co.rsk.mine.MinerServer in project rskj by rsksmart.
the class Web3ImplTest method eth_coinbase.
@Test
public void eth_coinbase() {
String originalCoinbase = "1dcc4de8dec75d7aab85b513f0a142fd40d49347";
MinerServer minerServerMock = mock(MinerServer.class);
when(minerServerMock.getCoinbaseAddress()).thenReturn(new RskAddress(originalCoinbase));
Ethereum ethMock = Web3Mocks.getMockEthereum();
Blockchain blockchain = Web3Mocks.getMockBlockchain();
TransactionPool transactionPool = Web3Mocks.getMockTransactionPool();
BlockStore blockStore = Web3Mocks.getMockBlockStore();
RskSystemProperties mockProperties = Web3Mocks.getMockProperties();
PersonalModule personalModule = new PersonalModuleWalletDisabled();
Web3 web3 = new Web3Impl(ethMock, blockchain, blockStore, null, mockProperties, null, minerServerMock, personalModule, null, null, null, null, null, null, null, Web3Mocks.getMockChannelManager(), null, null, null, null, null, null, null, mock(Web3InformationRetriever.class), null);
assertEquals("0x" + originalCoinbase, web3.eth_coinbase());
verify(minerServerMock, times(1)).getCoinbaseAddress();
}
Aggregations