package Ġcom . step stone . step per . test . test _ double Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . support . annotation . Int Range Ċ import Ġandroid . support . v 4 . app . FragmentManager Ċ import Ġandroid . util . Sparse Array Ċ import Ġcom . n ha ar man . mockito _ kotlin . spy Ċ import Ġcom . step stone . step per . Dummy Step Fragment Ċ import Ġcom . step stone . step per . Step Ċ import Ġcom . step stone . step per . adapter . Abstract Fragment Step Adapter Ċ import Ġcom . step stone . step per . view model . Step ViewModel Ċ Ċ /** Ċ Ġ* ĠCreates ĠS py Ġ[ Dummy Step Fragment ] s Ġwhich Ġcan Ġbe Ġlater Ġverified . Ċ Ġ*/ Ċ class ĠS py Step Adapter ( fm : ĠFragment Manager , Ġcontext : ĠContext , Ġval Ġview Models : ĠList < Step ViewModel >) Ġ: ĠAbstract Fragment Step Adapter ( fm , Ġcontext ) Ġ{ ĊĊĠĠĠ Ġval Ġsteps Ġ= ĠSparse Array < Step >() ĊĊĠĠĠ Ġoverride Ġfun Ġget ViewModel (@ Int Range ( from Ġ= Ġ 0 ) Ġposition : ĠInt ): ĠStep ViewModel Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġview Models [ position ] ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġcreate Step ( position : ĠInt ): ĠStep Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġstep Fragment Ġ= Ġspy ( Dummy Step Fragment ()) ĊĠĠĠĠĠĠĠ Ġsteps . put ( position , Ġstep Fragment ) ĊĠĠĠĠĠĠĠ Ġreturn Ġstep Fragment ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Count () Ġ= Ġview Models . size Ċ }