Permissive { public static boolean checkPermission(Context context, String permission) { return checkPermissionInt(context, permission) == PackageManager.PERMISSION_GRANTED; } private  Permissive(); static void registerGlobalRationale(String permission, Rationale rationale); static boolean checkPermission(Context context, String permission); static String[] filterPermissions(Context context, String[] permissions, int filter); static boolean hasPendingActions(); static final String PERMISSIVE_FRAGMENT_TAG; }
@Test public void testCheckPermission() { assertThat(Permissive.checkPermission(mockContext, TEST_GRANTED_PERMISSION), is(true)); assertThat(Permissive.checkPermission(mockContext, TEST_DENIED_PERMISSION), is(false)); }