@Override
  protected boolean isStepCompleted(@NonNull Context context) {
    // note: we can not use mSharedPrefs, since this method might be
    // called before onAttached is called.
    return (mSharedPrefs == null ? DirectBootAwareSharedPreferences.create(context) : mSharedPrefs)
        .getBoolean(STARTED_PREF_KEY, false);
  }
@Test
  public void testClickStart() {
    TestableWizardPageWelcomeFragment fragment = startFragment();
    Assert.assertFalse(fragment.isStepCompleted(getApplicationContext()));

    final View startView = fragment.getView().findViewById(R.id.go_to_start_setup);
    Assert.assertNotNull(startView);
    Assert.assertTrue(startView.isClickable());
    final ShadowView shadowStartView = Shadows.shadowOf(startView);
    Assert.assertNotNull(shadowStartView.getOnClickListener());
    Assert.assertFalse(fragment.mRefreshPagerCalled);
    startView.performClick();
    Assert.assertTrue(fragment.mRefreshPagerCalled);

    Assert.assertTrue(fragment.isStepCompleted(getApplicationContext()));
  }