WithDrawPresenter extends BasePresenter<WithDrawContract.View> implements WithDrawContract.Presenter { @Override public void getWithDrawGasPrice(String gasPrice) { String input = getView().getInputAmount(); if (TextUtils.isEmpty(input) || TextUtils.equals(input, ".")) { getView().showWithDrawGasPrice("0.00"); return; } if (mDelegateDetail == null || list.isEmpty() || mWithDrawBalance == null || mDelegationValue == null) { return; } getView().showWithDrawGasPrice(getFeeAmount(mWithDrawBalance.getGasProvider())); }  WithDrawBalance getmWithDrawBalance(); void setmWithDrawBalance(WithDrawBalance mWithDrawBalance); DelegateItemInfo getmDelegateDetail(); void setmDelegateDetail(DelegateItemInfo mDelegateDetail); DelegationValue getmDelegationValue(); void setmDelegationValue(DelegationValue mDelegationValue); Wallet getmWallet(); void setmWallet(Wallet mWallet); @Override void init(DelegateItemInfo delegateItemInfo); String getWalletAddress(); List<WithDrawBalance> getWithDrawBalanceList(); WithDrawBalance getWithDrawBalance(); double getMinDelegationAmount(); @Override void showWalletInfo(); void getEstimateGas(String prefixAddress, String nodeId); @Override void checkWithDrawAmount(String withdrawAmount); @Override void updateWithDrawButtonState(); @Override void getBalanceType(); @Override void getWithDrawGasPrice(String gasPrice); @Override void showSelectDelegationsDialogFragment(); @SuppressLint("CheckResult") @Override void submitWithDraw(); @SuppressLint("CheckResult") void withdraw(Credentials credentials, GasProvider gasProvider, String nodeId, String nodeName, String blockNum, String withdrawAmount, String nonce);  }
@Test public void getWithDrawGasPrice(){ WithDrawBalance mWithDrawBalance = new WithDrawBalance(); mWithDrawBalance.setGasLimit("1000"); mWithDrawBalance.setGasPrice("200"); presenter.setmWithDrawBalance(mWithDrawBalance); presenter.getWithDrawGasPrice("20"); Mockito.verify(view).showWithDrawGasPrice(Mockito.anyString()); }