package Ġcom . example . pr anit . mvp _ d agger . ui Ċ Ċ import Ġcom . example . pr anit . mvp _ d agger . data . UserList DataSource Ċ import Ġcom . example . pr anit . mvp _ d agger . model . User Response Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġorg . mockito . Mock Ċ import Ġorg . mockito . Mockito Ċ import Ġorg . mockito . Mockito Annotations Ċ Ċ class ĠUser List Presenter Test Ġ{ ĊĠĠĠ Ġ@ Mock Ġlateinit Ġvar Ġrepository Ġ: ĠUser List DataSource ĊĠĠĠ Ġ@ Mock Ġlateinit Ġvar Ġview Ġ: ĠUser List Contract . View ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġpresenter : ĠUser List Presenter ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġresponse : ĠUser Response ĊĊĠĠĠ Ġ@ Before Ġfun Ġsetup Presenter () Ġ{ ĊĠĠĠĠĠĠĠ ĠMockito Annotations . init Mocks ( this ) ĊĠĠĠĠĠĠĠ Ġpresenter Ġ= ĠUser List Presenter ( repository , view ) ĊĊĠĠĠĠĠĠĠ Ġresponse Ġ= ĠUser Response ( 0 , Ġ 3 , Ġ 1 2 , Ġ 4 , Ġnull ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ getAll Users List () Ġ{ ĊĠĠĠĠĠĠĠ Ġpresenter . getAll Users PerPage ( 0 ) ĊĠĠĠĠĠĠĠ ĠMockito . verify ( view , ĠMockito . never ()). on Success ( response ) ĊĠĠĠ Ġ} Ċ }