SendTransactionPresenter extends BasePresenter<SendTransationContract.View> implements SendTransationContract.Presenter { @Override public boolean checkToAddress(String toAddress) { int errMsgCode = JZWalletUtil.checkToAddressErrMsg(toAddress); if(errMsgCode > 0){ getView().showToAddressError(string(errMsgCode)); } return errMsgCode == 0; }  @Override void init(); String getSenderAddress(); @Override void fetchDefaultWalletInfo(); void getEstimateGas(Wallet mWallet); @Override void transferAllBalance(); @Override void calculateFee(); @Override void calculateFeeAndTime(float progress); @Override boolean checkToAddress(String toAddress); boolean checkToAddressNotSelf(String toAddress,String address); @Override boolean checkTransferAmount(String transferAmount); void checkTransferAmountDueToGasLimitChanged(String transferAmount); @Override void submit(); @Override void updateSendTransactionButtonStatus(); @Override void saveWallet(String name, String address); @Override void updateAssetsTab(int tabIndex); @Override void setGasLimit(String gasLimit); @Override void checkAddressBook(String address);  }
@Test public void checkToAddress(){ presenter.checkToAddress("lat1x8z5nfgjnaryutayxxkzzkrfzenpwl7k6r2a81"); Mockito.verify(view).showToAddressError(Mockito.any()); }