SystemAnimations { @VisibleForTesting void checkPermissionStatus(@NonNull Context context) { boolean hasPermission = getPermissionChecker().hasAnimationPermission(context); if (!hasPermission) { throw new IllegalStateException(getPermissionErrorMessage()); } } @VisibleForTesting  SystemAnimations(); static void disableAll(@NonNull Context context); static void enableAll(@NonNull Context context); static void restoreAll(@NonNull Context context);  }
@Test public void testPermissionGrantedNothingHappens() throws Exception { grantPermission(true); mSystemAnimations.checkPermissionStatus(mockContext); }