package Ġme . br am ha ag . min ig ame framework . tick Ċ Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . mock Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . times Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . verify Ċ import Ġorg . junit . jupiter . api . BeforeEach Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġkotlin . test . assertEquals Ċ import Ġkotlin . test . assertFalse Ċ import Ġkotlin . test . assertTrue Ċ Ċ internal Ġclass ĠAbstract Tick Handler Test Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġtick Handler : ĠAbstract Tick Handler ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġtick able : ĠI Tick able ĊĊĠĠĠ Ġ@ BeforeEach ĊĠĠĠ Ġfun Ġinit () Ġ{ ĊĠĠĠĠĠĠĠ Ġtick Handler Ġ= Ġobject Ġ: ĠAbstract Tick Handler () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġstart () Ġ{} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġtick able Ġ= Ġmock () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtick () Ġ{ ĊĠĠĠĠĠĠĠ Ġtick Handler . register Tick able ( tick able ) ĊĠĠĠĠĠĠĠ Ġtick Handler . tick () ĊĠĠĠĠĠĠĠ Ġverify ( tick able , Ġtimes ( 1 )). enable () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġregister Tick able () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertTrue ( tick Handler . tick ables . isEmpty ()) ĊĠĠĠĠĠĠĠ Ġtick Handler . register Tick able ( tick able ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġtick Handler . tick ables . size ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( tick Handler . tick ables . contains ( tick able )) ĊĠĠĠĠĠĠĠ Ġverify ( tick able , Ġtimes ( 1 )). enable () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġend Tick able () Ġ{ ĊĠĠĠĠĠĠĠ Ġtick Handler . register Tick able ( tick able ) ĊĠĠĠĠĠĠĠ Ġtick Handler . end Tick able ( tick able ) ĊĠĠĠĠĠĠĠ Ġtick Handler . tick () ĊĠĠĠĠĠĠĠ Ġverify ( tick able , Ġtimes ( 1 )). disable () ĊĠĠĠĠĠĠĠ ĠassertFalse ( tick Handler . tick ables . contains ( tick able )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġend Tick able _ NotFound () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertFalse ( tick Handler . tick ables . contains ( tick able )) ĊĠĠĠĠĠĠĠ Ġtick Handler . end Tick able ( tick able ) ĊĠĠĠĠĠĠĠ Ġtick Handler . tick () ĊĠĠĠĠĠĠĠ ĠassertFalse ( tick Handler . tick ables . contains ( tick able )) ĊĠĠĠ Ġ} Ċ }