@Test public void shouldThrowWhenApplicationIsNull() { @SuppressWarnings({ "ThrowableResultOfMethodCallIgnored", "ConstantConditions" }) Throwable throwable = catchThrowable(() -> sharedPreferencesModule.provideSharedPreferences(null)); assertThat(throwable).isExactlyInstanceOf(NullPointerException.class).hasNoCause(); }
@Provides @Singleton SharedPreferences provideSharedPreferences(@NonNull Application app) { return PreferenceManager.getDefaultSharedPreferences(checkNotNull(app)); }
SharedPreferencesModule { @Provides @Singleton SharedPreferences provideSharedPreferences(@NonNull Application app) { return PreferenceManager.getDefaultSharedPreferences(checkNotNull(app)); } }
SharedPreferencesModule { @Provides @Singleton SharedPreferences provideSharedPreferences(@NonNull Application app) { return PreferenceManager.getDefaultSharedPreferences(checkNotNull(app)); }  }
SharedPreferencesModule { @Provides @Singleton SharedPreferences provideSharedPreferences(@NonNull Application app) { return PreferenceManager.getDefaultSharedPreferences(checkNotNull(app)); }   }
SharedPreferencesModule { @Provides @Singleton SharedPreferences provideSharedPreferences(@NonNull Application app) { return PreferenceManager.getDefaultSharedPreferences(checkNotNull(app)); }    }