package Ġutils Ċ import Ġandroid . app . Activity Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . assertion . View Assertions . matches Ċ import Ġandroidx . test . espress o . intent . Intent s . int ended Ċ import Ġandroidx . test . espress o . intent . matcher . Intent Matchers Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Id Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Text Ċ Ċ class ĠMatch ers Ġ{ ĊĊĠĠĠ Ġfun Ġ< T Ġ: ĠActivity > Ġnext Open Activity Is ( activity : ĠClass < T >) Ġ{ ĊĠĠĠĠĠĠĠ Ġintended ( Intent Matchers . has Component ( activity . name )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġtext Matches ( textView Id : ĠInt , Ġtext To Match : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( textView Id )). check ( matches ( with Text ( text To Match ))) ĊĠĠĠ Ġ} Ċ } Ċ