Mock FingerprintManager in Android tests : <p>Is there a way to simulate or mock <a href="https://developer.android.com/reference/android/hardware/fingerprint/FingerprintManager.html#authenticate(android.hardware.fingerprint.FingerprintManager.CryptoObject,%20android.os.CancellationSignal,%20int,%20android.hardware.fingerprint.FingerprintManager.AuthenticationCallback,%20android.os.Handler)" rel="noreferrer">FingerprintManager.authenticate()</a>? I want to write instrumented tests for my fingerprint authenticator.</p>

<p>I'm fine if there's a solution with a restriction that the tests can be run either on an emulator or a device. I use JUnit 4.12.</p>
