package Ġcom . em ami . mov ied b . movie . data Ċ Ċ import Ġandroidx . paging . Load Type Ċ import Ġcom . em ami . mov ied b . movie . data . local . Local DataSource Ċ import Ġcom . em ami . mov ied b . movie . data . network . Remote DataSource Ċ import Ġcom . em ami . mov ied b . movie . util . Movie 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 Ġkotlinx . coroutines . test . run Blocking Test Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . ro bo lectric . Ro bo lectric TestRunner Ċ Ċ @ RunWith ( Ro bo lectric TestRunner :: class ) Ċ class ĠMovie Remote Mediator Test Ġ{ ĊĊĠĠĠ Ġval Ġremote DataSource Ġ= Ġmock < Remote DataSource >() ĊĠĠĠ Ġval Ġlocal DataSource Ġ= Ġmock < Local DataSource >() ĊĊĠĠĠ Ġval Ġremote Mediator Ġ= ĠMovie Remote Mediator ( ĊĠĠĠĠĠĠĠ ĠMovie Filter . SORT . ASC ENDING , Ġremote DataSource , Ġlocal DataSource , ĊĠĠĠĠĠĠĠ Ġmock () ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` should Ġclear Ġtables Ġwhen Ġrefresh ing `() Ġ= Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠ Ġremote Mediator . load ( Load Type . REFRESH , Ġmock ()) ĊĊĠĠĠĠĠĠĠ Ġverify ( local DataSource ). clear All Tables () ĊĠĠĠ Ġ} Ċ }