@Test public void shouldProvidePassedActivity() { Activity activity = mock(Activity.class); ActivityModule activityModule = new ActivityModule(activity); assertThat(activityModule.provideActivity()).isSameAs(activity); }
@Provides Activity provideActivity() { return activity; }
ActivityModule { @Provides Activity provideActivity() { return activity; } }
ActivityModule { @Provides Activity provideActivity() { return activity; } ActivityModule(@NonNull Activity activity); }
ActivityModule { @Provides Activity provideActivity() { return activity; } ActivityModule(@NonNull Activity activity);  }
ActivityModule { @Provides Activity provideActivity() { return activity; } ActivityModule(@NonNull Activity activity);   }