@Override
  public void askAccessPermissions(@NonNull final DecryptionContext context) {
    this.context = context;

    if (!DeviceAvailability.isPermissionsGranted(reactContext)) {
      final CryptoFailedException failure = new CryptoFailedException(
        "Could not start fingerprint Authentication. No permissions granted.");

      onDecrypt(null, failure);
    } else {
      startAuthentication();
    }
  }
@Test(expected= NullPointerException.class)
  @Config(sdk = Build.VERSION_CODES.M)
  public void testBiometryAuthenticationErrorNoActivity() {
    // GIVEN
    final KeyguardManager keyguardManager = mock(KeyguardManager.class);
    when(keyguardManager.isKeyguardSecure()).thenReturn(true);

    final ReactApplicationContext mockContext = mock(ReactApplicationContext.class);
    when(mockContext.getSystemService(Context.KEYGUARD_SERVICE)).thenReturn(keyguardManager);
    when(mockContext.checkSelfPermission(Manifest.permission.USE_FINGERPRINT)).thenReturn(PERMISSION_GRANTED);

    final CipherStorage storage = mock(CipherStorageBase.class);
    final BiometricPrompt.PromptInfo promptInfo = mock(BiometricPrompt.PromptInfo.class);
    final CipherStorage.DecryptionContext decryptionContext = mock(CipherStorage.DecryptionContext.class);

    // WHEN
    DecryptionResultHandlerInteractiveBiometric handler = new DecryptionResultHandlerInteractiveBiometric(mockContext, storage, promptInfo);
    handler.askAccessPermissions(decryptionContext);
  }