SystemAnimations { public static void disableAll(@NonNull Context context) { getInstance(context).disableAll(); } @VisibleForTesting  SystemAnimations(); static void disableAll(@NonNull Context context); static void enableAll(@NonNull Context context); static void restoreAll(@NonNull Context context);  }
@Test public void testDisableAll() throws Exception { grantPermission(true); when(mockWindowManager.getAnimationScales()).thenReturn(new float[]{1f, 1f, 1f}); mSystemAnimations.disableAll(); verify(mockWindowManager).getAnimationScales(); verify(mockWindowManager).setAnimationScales(new float[]{0f, 0f, 0f}); }