package Ġio . github . dl le w el lyn . saf et or un . off device . builders Ċ Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġio . github . dl le w el lyn . saf et or un . features . black listed apps . Installed Packages Query Ċ import Ġio . github . dl le w el lyn . saf et or un . models . builders . device Information Builder Ċ import Ġio . mock k . every Ċ import Ġio . mock k . mock k Ċ import Ġjunit . framework . TestCase Ċ Ċ internal Ġclass ĠBlack listed Apps Off Device Builder Test Ġ: ĠTestCase () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġblack listed App Check Ġ= Ġmock k < Installed Packages Query >() ĊĊĠĠĠ Ġoverride Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġblack listed App Check . list Installed Packages () Ġ} Ġreturns Ġinstalled Packages ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġ` test Ġthat Ġblack listed Ġapp Ġoff Ġdevice Ġtest Ġwill Ġprovide Ġall Ġpackages Ġreturned `() Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠGiven ĊĠĠĠĠĠĠĠ Ġval Ġblack listed App Off Device Builder Ġ= ĠBlack listed Apps Off Device Builder ( black listed App Check ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠWhen ĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġblack listed App Off Device Builder . build Off Device Result Builder ( device Information Builder ("")) ĊĊĠĠĠĠĠĠĠ Ġ// ĠThen ĊĠĠĠĠĠĠĠ ĠassertThat ( result . build Partial (). black listed App . installed Packages ). isEqualTo ( installed Packages ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġinstalled Packages Ġ= ĠlistOf (" com . abc ", Ġ" def . hi j ", Ġ" kl m . n mo ") ĊĠĠĠ Ġ} Ċ } Ċ