package Ġcom . facebook . screenshots Ċ Ċ import Ġandroid . support . test . rule . Activity Test Rule Ċ import Ġandroid . support . test . runner . Android JUnit 4 Ċ import Ġcom . facebook . testing . screenshot . Screenshot Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ class ĠMainActivity Test Ġ{ ĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġprivate Ġvar Ġrule Ġ= ĠActivity Test Rule ( MainActivity :: class . java , Ġtrue , Ġfalse ) ĊĊĠĠĠ Ġ@ Test Ġfun Ġopen MainActivity Successfully () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġactivity Ġ= Ġrule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ ĠScreen shot . snap Activity ( activity ). record () ĊĠĠĠ Ġ} Ċ Ċ }