### Question:
ContextCompat { @Nullable public static ColorStateList getColorStateList(@NonNull Context context, @ColorRes int id) { if (Build.VERSION.SDK_INT >= 23) { return context.getColorStateList(id); } else { return context.getResources().getColorStateList(id); } } protected  ContextCompat(); static boolean startActivities(@NonNull Context context, @NonNull Intent[] intents); static boolean startActivities(@NonNull Context context, @NonNull Intent[] intents,
            @Nullable Bundle options); static void startActivity(@NonNull Context context, @NonNull Intent intent,
            @Nullable Bundle options); @Nullable static File getDataDir(@NonNull Context context); @NonNull static File[] getObbDirs(@NonNull Context context); @NonNull static File[] getExternalFilesDirs(@NonNull Context context, @Nullable String type); @NonNull static File[] getExternalCacheDirs(@NonNull Context context); @Nullable static Drawable getDrawable(@NonNull Context context, @DrawableRes int id); @Nullable static ColorStateList getColorStateList(@NonNull Context context,
            @ColorRes int id); @ColorInt static int getColor(@NonNull Context context, @ColorRes int id); static int checkSelfPermission(@NonNull Context context, @NonNull String permission); @Nullable static File getNoBackupFilesDir(@NonNull Context context); static File getCodeCacheDir(@NonNull Context context); @Nullable static Context createDeviceProtectedStorageContext(@NonNull Context context); static boolean isDeviceProtectedStorage(@NonNull Context context); static void startForegroundService(@NonNull Context context, @NonNull Intent intent); @SuppressWarnings("unchecked") @Nullable static T getSystemService(@NonNull Context context, @NonNull Class<T> serviceClass); @Nullable static String getSystemServiceName(@NonNull Context context,
            @NonNull Class<?> serviceClass);  }### Answer:
@Test public void testGetColorStateList() throws Throwable { ColorStateList unthemedColorStateList = ContextCompat.getColorStateList(mContext, R.color.complex_unthemed_selector); assertEquals("Unthemed color state list load: default", 0xFF70A0C0, unthemedColorStateList.getDefaultColor()); assertEquals("Unthemed color state list load: focused", 0xFF70B0F0, unthemedColorStateList.getColorForState( new int[]{android.R.attr.state_focused}, 0)); assertEquals("Unthemed color state list load: pressed", 0xFF6080B0, unthemedColorStateList.getColorForState( new int[]{android.R.attr.state_pressed}, 0)); if (Build.VERSION.SDK_INT >= 23) { ColorStateList themedYellowColorStateList = ContextCompat.getColorStateList(mContext, R.color.complex_themed_selector); assertEquals("Themed yellow color state list load: default", 0xFFF0B000, themedYellowColorStateList.getDefaultColor()); assertEquals("Themed yellow color state list load: focused", 0xFFF0A020, themedYellowColorStateList.getColorForState( new int[]{android.R.attr.state_focused}, 0)); assertEquals("Themed yellow color state list load: pressed", 0xFFE0A040, themedYellowColorStateList.getColorForState( new int[]{android.R.attr.state_pressed}, 0)); } }