package Ġcom . g ig ya . android . sdk . nss Ċ Ċ import Ġandroid . content . Context Ċ import Ġcom . g ig ya . android . sdk . containers . G ig ya Container Ċ import Ġcom . g ig ya . android . sdk . nss . engine . N ss Engine Life Cycle Ċ import Ġcom . g ig ya . android . sdk . utils . FileUtils Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . mockito . Mock Ċ import Ġorg . mockito . Mockito Annotations Ċ import Ġorg . power mock . api . mockito . Power Mockito Ċ import Ġorg . power mock . core . class loader . annotations . Prepare For Test Ċ import Ġorg . power mock . modules . junit 4 . Power Mock Runner Ċ Ċ @ RunWith ( Power Mock Runner :: class ) Ċ @ Prepare For Test ( FileUtils :: class , ĠG ig y aN ss :: class , ĠN ss Engine Life Cycle :: class , ĠN ss ViewModel :: class , ĠG ig ya Container :: class ) Ċ abstract Ġclass ĠN ss TestCase Ġ{ ĊĊĠĠĠ Ġ@ Mock ĊĠĠĠ Ġprotected Ġval Ġcontext : ĠContext ? Ġ= Ġnull ĊĊĠĠĠ Ġ@ Mock ĊĠĠĠ Ġprotected Ġval Ġengine Life Cycle : ĠN ss Engine Life Cycle ? Ġ= Ġnull ĊĊĠĠĠ Ġ@ Mock ĊĠĠĠ Ġprotected Ġval Ġcontainer : ĠG ig ya Container ? Ġ= Ġnull ĊĊĠĠĠ Ġ@ Mock ĊĠĠĠ Ġprotected Ġval ĠviewModel : ĠN ss ViewModel < *> ? Ġ= Ġnull ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun Ġprepare Mocks () Ġ{ ĊĠĠĠĠĠĠĠ ĠMockito Annotations . init Mocks ( this ) ĊĠĠĠĠĠĠĠ ĠPower Mockito . mock Static ( FileUtils :: class . java , ĠG ig y aN ss :: class . java ) ĊĊĠĠĠĠĠĠĠ Ġval Ġfield Ġ= ĠPower Mockito . field ( G ig y aN ss :: class . java , Ġ" dependencies Container ") ĊĠĠĠĠĠĠĠ Ġfield . set ( G ig y aN ss :: class . java , Ġcontainer ) ĊĊĠĠĠĠĠĠĠ ĠPower Mockito .` when `( container ?. get ( N ss ViewModel :: class . java )). thenReturn ( viewModel ) ĊĠĠĠĠĠĠĠ ĠPower Mockito .` when `( container ?. get ( N ss Engine Life Cycle :: class . java )). thenReturn ( engine Life Cycle ) ĊĊĠĠĠĠĠĠĠ ĠPower Mockito . do Nothing (). ` when `( engine Life Cycle )?. initialize Engine () ĊĠĠĠ Ġ} Ċ Ċ }