package Ġapp . home Ċ Ċ import Ġandroid . support . test . espress o . matcher . View Matchers . is Displayed Ċ import Ġandroid . support . test . rule . Activity Test Rule Ċ import Ġandroid . support . test . runner . Android JUnit 4 Ċ import Ġapp . home . Home Robot . Companion . home Ċ import Ġorg . hamcrest . Matchers . not Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ internal Ġclass ĠHome Test Ġ{ ĊĠ Ġ@ Jvm Field ĊĠ Ġ@ Rule ĊĠ Ġval Ġactivity Test Rule Ġ= ĠActivity Test Rule < Home Activity >( Home Activity :: class . java ) ĊĠ Ġprivate Ġlateinit Ġvar Ġsubject : ĠHome Robot ĊĊĠ Ġ@ Before ĊĠ Ġfun Ġsetup () Ġ{ ĊĠĠĠ Ġsubject Ġ= Ġhome () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġinstrument ed Pass Works () Ġ{ ĊĠĠĠ Ġsubject . assert ( Home Robot . Item . ROOT _ CONTENT , Ġis Displayed ()) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġinstrument ed Fail Works () Ġ{ ĊĠĠĠ Ġsubject . assert ( Home Robot . Item . ROOT _ CONTENT , Ġnot ( is Displayed ())) ĊĠ Ġ} Ċ } Ċ