package Ġcom . popular movies . vp aliy . domain Ċ Ċ import Ġcom . n ha ar man . mockito _ kotlin .* Ċ import Ġcom . popular movies . vp aliy . domain . inter actor . Get Page Ċ import Ġcom . popular movies . vp aliy . domain . repository . Media Repository Ċ import Ġio . reactivex . Single Ċ import Ġorg . junit . Test Ċ import Ġorg . mockito . Inject Mocks Ċ import Ġorg . mockito . Mock Ċ import Ġjava . util .* Ċ Ċ class ĠGet Page Interactor : Base Interactor Test (){ ĊĠ Ġ@ Mock Ġlateinit Ġvar Ġrepository : ĠMedia Repository < *> ĊĠ Ġ@ Inject Mocks Ġlateinit Ġvar Ġinter actor : ĠGet Page < *> ĊĠ Ġprivate Ġval Ġsuccess Ġby Ġlazy ( Lazy Thread Safety Mode . NONE ) Ġ{ ĊĠĠĠ ĠonSuccess < List <* >>() ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Execute () Ġ{ ĊĠĠĠ Ġinter actor . execute ( success , Ġerror ) ĊĊĠĠĠ Ġverify Scheduler () ĊĠĠĠ Ġverify ( success , Ġnever ()). invoke ( any ()) ĊĠĠĠ Ġverify ( error ). invoke ( any ()) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Execute With Wrong Argument () Ġ{ ĊĠĠĠ Ġwhenever ( repository . fetch List ( any ())). thenReturn ( Single . just ( Collections . emptyList ())) ĊĠĠĠ Ġinter actor . execute ( success , Ġerror , ĠDEFAULT ) ĊĊĠĠĠ Ġverify Scheduler () ĊĠĠĠ Ġverify ( repository ). fetch List ( eq ( DEFAULT )) ĊĠĠĠ Ġverify ( success ). invoke ( any ()) ĊĠĠĠ Ġverify ( error , Ġnever ()). invoke ( any ()) ĊĠ Ġ} Ċ }