### Question:
WizardManagerHelper { public static boolean isDeviceProvisioned(Context context) { if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) { return Settings.Global.getInt( context.getContentResolver(), SETTINGS_GLOBAL_DEVICE_PROVISIONED, 0) == 1; } else { return Settings.Secure.getInt( context.getContentResolver(), SETTINGS_GLOBAL_DEVICE_PROVISIONED, 0) == 1; } }  static Intent getNextIntent(Intent originalIntent, int resultCode); static Intent getNextIntent(Intent originalIntent, int resultCode, Intent data); static void copyWizardManagerExtras(Intent srcIntent, Intent dstIntent); static boolean isSetupWizardIntent(Intent intent); static boolean isUserSetupComplete(Context context); static boolean isDeviceProvisioned(Context context); static boolean isDeferredSetupWizard(Intent originalIntent); static boolean isPreDeferredSetupWizard(Intent originalIntent); static boolean isLightTheme(Intent intent, boolean def); static boolean isLightTheme(String theme, boolean def); @Deprecated static @StyleRes int getThemeRes(Intent intent, @StyleRes int defaultTheme); @Deprecated static @StyleRes int getThemeRes(
      Intent intent, @StyleRes int defaultTheme, @Nullable String oldestSupportedTheme); @Deprecated static @StyleRes int getThemeRes(
      String theme, @StyleRes int defaultTheme, @Nullable String oldestSupportedTheme); @Deprecated static @StyleRes int getThemeRes(@Nullable String theme, @StyleRes int defaultTheme); static void applyTheme(Activity activity); @VisibleForTesting static final String EXTRA_IS_SETUP_FLOW; static final String EXTRA_THEME; static final String EXTRA_USE_IMMERSIVE_MODE; static final String SETTINGS_GLOBAL_DEVICE_PROVISIONED; static final String SETTINGS_SECURE_USER_SETUP_COMPLETE; static final String THEME_HOLO; static final String THEME_HOLO_LIGHT; static final String THEME_MATERIAL; static final String THEME_MATERIAL_LIGHT; static final String THEME_GLIF; static final String THEME_GLIF_LIGHT; static final String THEME_GLIF_V2; static final String THEME_GLIF_V2_LIGHT; static final String THEME_GLIF_V3; static final String THEME_GLIF_V3_LIGHT; }### Answer:
@TargetApi(VERSION_CODES.JELLY_BEAN_MR1) @Test public void testIsDeviceProvisioned() { Settings.Global.putInt(application.getContentResolver(), Global.DEVICE_PROVISIONED, 1); assertThat(WizardManagerHelper.isDeviceProvisioned(application)).isTrue(); Settings.Global.putInt(application.getContentResolver(), Global.DEVICE_PROVISIONED, 0); assertThat(WizardManagerHelper.isDeviceProvisioned(application)).isFalse(); }
@Test @Config(sdk = VERSION_CODES.JELLY_BEAN) public void testIsDeviceProvisionedCompat() { Settings.Secure.putInt(application.getContentResolver(), Secure.DEVICE_PROVISIONED, 1); assertThat(WizardManagerHelper.isDeviceProvisioned(application)).isTrue(); Settings.Secure.putInt(application.getContentResolver(), Secure.DEVICE_PROVISIONED, 0); assertThat(WizardManagerHelper.isDeviceProvisioned(application)).isFalse(); }