package Ġcom . lang ford apps . task manager . tasks display . domain Ċ Ċ import Ġcom . lang ford apps . task manager . commons . data . Tasks DataSource Ċ import Ġcom . lang ford apps . task manager . commons . domain . Base Filter Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . mock Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . verify Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . verify No More Interactions Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . wh enever Ċ import Ġkotlinx . coroutines . run Blocking Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Test Ċ Ċ class ĠGet Tasks Count UseCase Test Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġbase Filter : ĠBase Filter Ġ= Ġmock () ĊĠĠĠ Ġprivate Ġval Ġtasks DataSource : ĠTasks DataSource Ġ= Ġmock () ĊĠĠĠ Ġprivate Ġval Ġmocks Ġ= ĠarrayOf ( base Filter , Ġtasks DataSource ) ĊĊĠĠĠ Ġprivate Ġval Ġget Tasks Count UseCase Ġ= ĠGet Tasks Count UseCase ( tasks DataSource ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġexecute () Ġ= Ġrun Blocking Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġfake Result Ġ= Ġ 1 0 L ĊĠĠĠĠĠĠĠ Ġwhenever ( tasks DataSource . get Tasks Count ( base Filter )). thenReturn ( fake Result ) ĊĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġget Tasks Count UseCase . execute ( base Filter ) ĊĊĠĠĠĠĠĠĠ Ġverify ( tasks DataSource ). get Tasks Count ( base Filter ) ĊĠĠĠĠĠĠĠ Ġverify No More Interactions (* mocks ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( fake Result , Ġresult ) ĊĠĠĠ Ġ} Ċ }