@Test
  public void testOnboardingNotCompletedForNewUser() {
    Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
    setOnboardingCompletedPreference(context, false);
    AuthenticatorActivity activity = activityTestRule.launchActivity(null);
    assertThat(activity.onboardingCompleted).isFalse();
  }
Unit tests for {@link AuthenticatorActivity} (part/shard 1).
javatests/com/google/android/apps/authenticator/AuthenticatorActivityTest.java