### Question:
ContextCompat { @SuppressWarnings("unchecked") @Nullable public static <T> T getSystemService(@NonNull Context context, @NonNull Class<T> serviceClass) { if (Build.VERSION.SDK_INT >= 23) { return context.getSystemService(serviceClass); } String serviceName = getSystemServiceName(context, serviceClass); return serviceName != null ? (T) context.getSystemService(serviceName) : null; } 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 getSystemService() { LayoutInflater inflater = ContextCompat.getSystemService(mContext, LayoutInflater.class); assertNotNull(inflater); }
@Test public void getSystemServiceUnknown() { assertNull(ContextCompat.getSystemService(mContext, String.class)); }