package Ġio . fresh d roid . sky scanner . view models Ċ Ċ import Ġandroid . net . Uri Ċ import Ġio . fresh d roid . sky scanner . Sky scanner Ro bo lectric TestCase Ċ import Ġio . fresh d roid . sky scanner . navigation . Application Map Ċ import Ġio . fresh d roid . sky scanner . splash screen . Splash Screen Environment Ċ import Ġio . fresh d roid . sky scanner . splash screen . di . D agger Splash Screen Component Ċ import Ġio . fresh d roid . sky scanner . splash screen . di . Splash Screen Component Ċ import Ġio . fresh d roid . sky scanner . splash screen . view models . Splash Screen ViewModel Ċ import Ġio . reactivex . schedul ers . Test Scheduler Ċ import Ġio . reactivex . subscribers . Test Subscriber Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġjava . util . concurrent . TimeUnit Ċ Ċ internal Ġclass ĠSpl ash Screen ViewModel Test Ġ: ĠSky scanner Ro bo lectric TestCase () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġcomponent : ĠSpl ash Screen Component ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun Ġinit Component () Ġ{ ĊĠĠĠĠĠĠĠ Ġcomponent Ġ= ĠD agger Splash Screen Component . builder (). core Component ( core Component ()). build () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġenvironment (): ĠSpl ash Screen Environment Ġ= Ġcomponent . environment () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Launch Next Activity () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtest Scheduler Ġ= ĠTest Scheduler () ĊĠĠĠĠĠĠĠ Ġval Ġenvironment Ġ= Ġenvironment (). copy ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġscheduler Ġ= Ġtest Scheduler ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġval Ġvm Ġ= ĠSpl ash Screen ViewModel ( environment , Ġscope Provider ()) ĊĠĠĠĠĠĠĠ Ġval Ġlaunch Next Activity Ġ= ĠTest Subscriber < Uri >() ĊĠĠĠĠĠĠĠ Ġvm . outputs . launch Next Activity (). subscribe ( launch Next Activity :: onNext ) ĊĊĠĠĠĠĠĠĠ Ġvm . inputs . fake Loading () ĊĠĠĠĠĠĠĠ Ġtest Scheduler . advance Time By ( 1 0 0 0 , ĠTimeUnit . MILLISECONDS ) ĊĠĠĠĠĠĠĠ Ġlaunch Next Activity . assert Value Ġ{ Ġit Ġ== ĠUri . parse ( Application Map . SEARCH ) Ġ} ĊĠĠĠ Ġ} Ċ Ċ }