DexterInstance { void onActivityDestroyed(Activity oldActivity) { if (activity == oldActivity) { activity = null; isRequestingPermission.set(false); rationaleAccepted.set(false); isShowingNativeDialog.set(false); listener = EMPTY_LISTENER; } } DexterInstance(Context context, AndroidPermissionService androidPermissionService,
      IntentProvider intentProvider);   }
@Test public void onCheckPermissionAgainAfterActivityDestroyedThenRequestedTwice() { givenPermissionIsAlreadyDenied(ANY_PERMISSION); whenCheckPermission(permissionListener, ANY_PERMISSION); dexter.onActivityDestroyed(activity); whenCheckPermission(permissionListener, ANY_PERMISSION); verifyRequestPermissions(new String[]{ANY_PERMISSION}, 2); }