package Ġlive . dit to . rx java 3 dit to . library . android Ċ Ċ import Ġandroid . app . Notification Ċ import Ġandroidx . test . ext . junit . runners . Android JUnit 4 Ċ import Ġandroidx . test . platform . app . Instrumentation Registry Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ Ċ /** Ċ Ġ* ĠInstrument ed Ġtest , Ġwhich Ġwill Ġexecute Ġon Ġan ĠAndroid Ġdevice . Ċ Ġ* Ċ Ġ* ĠSee Ġ[ testing Ġdocumentation ]( http :// d . android . com / tools / testing ). Ċ Ġ*/ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ class ĠNotification Util Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcreate Correct Notification () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcontext Ġ= ĠInstrument ation Registry . get Instrumentation (). target Context ĊĊĠĠĠĠĠĠĠ Ġval Ġnotification Ġ= ĠNotification Util ( context ). show Notification ( context , Ġ" test Ġtitle ", Ġ" test Ġmessage ") ĊĊĠĠĠĠĠĠĠ ĠassertEquals (" test Ġtitle ", Ġnotification . extras . get CharSequence ( Notification . EXTRA _ TITLE )) ĊĠĠĠĠĠĠĠ ĠassertEquals (" test Ġmessage ", Ġnotification . extras . get CharSequence ( Notification . EXTRA _ TEXT )) ĊĠĠĠ Ġ} Ċ } Ċ