package Ġapp . od applications . bit stash wallet . modules . pin . set Ċ Ċ import Ġcom . n ha ar man . mockito _ kotlin . any Ċ import Ġcom . n ha ar man . mockito _ kotlin . verify Ċ import Ġcom . n ha ar man . mockito _ kotlin . wh enever Ċ import Ġapp . od applications . bit stash wallet . modules . Rx Base Test Ċ import Ġapp . od applications . bit stash wallet . modules . pin . Pin Module Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġorg . mockito . Mockito Ċ Ċ class ĠSet Pin Presenter Test Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġinter actor Ġ= ĠMockito . mock ( Pin Module . I Interactor :: class . java ) ĊĠĠĠ Ġprivate Ġval Ġrouter Ġ= ĠMockito . mock ( Set Pin Module . I Router :: class . java ) ĊĠĠĠ Ġprivate Ġval Ġview Ġ= ĠMockito . mock ( Pin Module . I View :: class . java ) ĊĠĠĠ Ġprivate Ġvar Ġpresenter Ġ= ĠSet Pin Presenter ( view , Ġrouter , Ġinter actor ) ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ ĠRx Base Test . setup () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġview Did Load _ setTitle () Ġ{ ĊĠĠĠĠĠĠĠ Ġpresenter . view Did Load () ĊĠĠĠĠĠĠĠ Ġverify ( view ). setTitle ( any ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġview Did Load () Ġ{ ĊĠĠĠĠĠĠĠ Ġpresenter . view Did Load () ĊĠĠĠĠĠĠĠ Ġverify ( view ). add Pages ( any ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshow Confirm () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpin Ġ= Ġ" 0 0 0 0 0 0 " ĊĠĠĠĠĠĠĠ Ġval Ġconfirm Page Index Ġ= Ġ 1 ĊĠĠĠĠĠĠĠ Ġwhenever ( inter actor . validate ( any ())). thenReturn ( true ) ĊĠĠĠĠĠĠĠ Ġpresenter . on Enter ( pin , Ġconfirm Page Index ) ĊĊĠĠĠĠĠĠĠ Ġverify ( inter actor ). save ( pin ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġdid Save Pin () Ġ{ ĊĠĠĠĠĠĠĠ Ġpresenter . did Save Pin () ĊĠĠĠĠĠĠĠ Ġverify ( router ). dismiss Module With Success () ĊĠĠĠ Ġ} Ċ } Ċ