/** Ċ * ĠCopyright ĠS or am its u ĠCo ., ĠLtd . ĠAll ĠRights ĠReserved . Ċ * ĠSPDX - License - Identifier : ĠGPL - 3 . 0 Ċ */ Ċ Ċ package Ġjp . co . sor am its u . feature _ main _ impl . presentation . pin code . fingerprint Ċ Ċ import Ġandroidx . bio metric . Bio metric Constants Ċ import Ġandroidx . bio metric . Bio metric Prompt Ċ import Ġjp . co . sor am its u . feature _ main _ impl . presentation . pin code . Pin Code ViewModel Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . mockito . Mock Ċ import Ġorg . mockito . Mockito . mock Ċ import Ġorg . mockito . Mockito . verify Ċ import Ġorg . mockito . Mockito . verify No More Interactions Ċ import Ġorg . mockito . junit . Mockito JUnit Runner Ċ Ċ @ RunWith ( Mockito JUnit Runner :: class ) Ċ class ĠF ingerprint Callback Test Ġ{ ĊĊĠĠĠ Ġ@ Mock Ġlateinit Ġvar Ġpin Code ViewModel : ĠPin Code ViewModel ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġfingerprint Callback : ĠF ingerprint Callback ĊĊĠĠĠ Ġ@ Before Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġfingerprint Callback Ġ= ĠF ingerprint Callback ( pin Code ViewModel ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` on Authentication Succeeded Ġcalled `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġmock ( Bio metric Prompt . Authentication Result :: class . java ) ĊĠĠĠĠĠĠĠ Ġfingerprint Callback . on Authentication Succeeded ( result ) ĊĊĠĠĠĠĠĠĠ Ġverify ( pin Code ViewModel ). on Authentication Succeeded () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` on Authentication Failed Ġcalled `() Ġ{ ĊĠĠĠĠĠĠĠ Ġfingerprint Callback . on Authentication Failed () ĊĊĠĠĠĠĠĠĠ Ġverify ( pin Code ViewModel ). on Authentication Failed () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġ` on Authentication Error Ġcalled Ġwith Ġerror Ġfrom Ġlist `() Ġ{ ĊĠĠĠĠĠĠĠ Ġfingerprint Callback . on Authentication Error ( Bio metric Constants . ERROR _ C ANCE LED ," ") ĊĊĠĠĠĠĠĠĠ Ġverify ( pin Code ViewModel ). c anceled From Prompt () ĊĠĠĠ Ġ} Ċ }