package Ġcom . stripe . android . view Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroidx . test . core . app . Application Provider Ċ import Ġcom . stripe . android . ApiKey Fixtures Ċ import Ġcom . stripe . android . Payment Configuration Ċ import Ġkotlin . test . Before Test Ċ import Ġkotlin . test . Test Ċ import Ġkotlin . test . assertTrue Ċ import Ġkotlinx . coroutines . Main Scope Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . ro bo lectric . Ro bo lectric TestRunner Ċ Ċ @ RunWith ( Ro bo lectric TestRunner :: class ) Ċ class ĠF px ViewModel Test Ġ{ ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġcontext : ĠApplication ĊĊĠĠĠ Ġ@ Before Test ĊĠĠĠ Ġfun Ġsetup () Ġ{ ĊĠĠĠĠĠĠĠ Ġcontext Ġ= ĠApplication Provider . getApplicationContext () ĊĠĠĠĠĠĠĠ ĠPayment Configuration . init ( context , ĠApi Key Fixtures . DEFAULT _ PUBL ISH ABLE _ KEY ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġload F px Bank Stat ues _ working On MainThread _ should Update LiveData () Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠviewModel Ġ= ĠF px ViewModel ( context , ĠMain Scope ()) ĊĠĠĠĠĠĠĠ ĠviewModel . load F px Bank Stat ues () ĊĠĠĠĠĠĠĠ Ġval Ġf px Bank Statuses Ġ= Ġrequire NotNull ( viewModel . f px Bank Statuses . value ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( f px Bank Statuses . is Online ( F px Bank . Hs bc . id )) ĊĠĠĠ Ġ} Ċ } Ċ