package Ġnl . j ov mit . friends . people Ċ Ċ import Ġnl . j ov mit . friends . Instant Task Executor Extension Ċ import Ġnl . j ov mit . friends . app . Test Dispatch ers Ċ import Ġnl . j ov mit . friends . domain . exceptions . Backend Exception Ċ import Ġnl . j ov mit . friends . domain . exceptions . Connection Unavailable Exception Ċ import Ġnl . j ov mit . friends . domain . people . People Catalog Ċ import Ġnl . j ov mit . friends . domain . people . People Repository Ċ import Ġnl . j ov mit . friends . domain . user . Friend Ċ import Ġnl . j ov mit . friends . people . state . People State Ċ import Ġorg . junit . jupiter . api . Assertions . assertEquals Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . api . extension . Extend With Ċ Ċ @ Extend With ( Instant Task Executor Extension :: class ) Ċ class ĠFail People Loading Test Ġ{ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġbackend Error () Ġ{ ĊĠĠĠ Ġval ĠviewModel Ġ= ĠPeople ViewModel ( People Repository ( Unavailable People Catalog ()), ĠTest Dispatch ers ()) ĊĊĠĠĠ ĠviewModel . load People (": ir relevant :") ĊĊĠĠĠ ĠassertEquals ( People State . Backend Error , ĠviewModel . people State . value ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġoffline Error () Ġ{ ĊĠĠĠ Ġval ĠviewModel Ġ= ĠPeople ViewModel ( People Repository ( Offline People Catalog ()), ĠTest Dispatch ers ()) ĊĊĠĠĠ ĠviewModel . load People (": ir relevant :") ĊĊĠĠĠ ĠassertEquals ( People State . Offline , ĠviewModel . people State . value ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġclass ĠUn available People Catalog Ġ: ĠPeople Catalog Ġ{ ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġload People For ( userId : ĠString ): ĠList < Friend > Ġ{ ĊĠĠĠĠĠ Ġthrow ĠBackend Exception () ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġclass ĠOff line People Catalog Ġ: ĠPeople Catalog Ġ{ ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġload People For ( userId : ĠString ): ĠList < Friend > Ġ{ ĊĠĠĠĠĠ Ġthrow ĠConnection Unavailable Exception () ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ }