ImportMnemonicPhrasePresenter extends BasePresenter<ImportMnemonicPhraseContract.View> implements ImportMnemonicPhraseContract.Presenter { @Override public void parseQRCode(String QRCode) { if (isViewAttached()) { if (TextUtils.isEmpty(QRCode)) { return; } List<String> words = Arrays.asList(QRCode.split(" ")); if (words != null && words.size() == 12) { getView().showMnemonicWords(words); } } }  @Override void init(); @Override void parseQRCode(String QRCode); @Override void importMnemonic(String phrase, String name, String password, String repeatPassword, @WalletType int walletType); @Override boolean isExists(String walletName); @Override void loadDBWalletNumber();  }
@Test public void testParseQRCode(){ String QRCode = "a b c d e f g i q t h e"; presenter.parseQRCode(QRCode); Mockito.verify(view).showMnemonicWords(Mockito.anyList()); }