title: Dagger 2 How to inject object into test
body: <p>I would like to use my realm manager into unit test module. 
  I did </p>
  
  <pre><code>@Singleton
  @Component(modules = {
          TestApplicationModule.class,
          AndroidSupportInjectionModule.class,
          TestStoreDataModule.class,
          TestUtilsModule.class})
  public interface AppComponentTest extends AppComponent {
  
      @Component.Builder
      interface Builder {
  
          @BindsInstance
          AppComponentTest.Builder application(Application application);
  
          AppComponentTest build();
      }
  }
  </code></pre>
  
  <p>and then I want to achieve</p>
  
  <pre><code>@RunWith(RobolectricTestRunner.class)
  @Config(application = TestVerioriApplication.class, sdk=27)
  public class BaseVerificationQuestionnaireFragmentTest {
  
      @Inject
      RealmManager realmManager;
  }
  </code></pre>
  
  <p>But realmManager is null. How to use dagger 2 to write simple module test ? I used dagger-mock but it does not help. My module contains </p>
  
  <pre><code>@Module(includes = StoreDataModule.class)
  public class TestStoreDataModule {
  
      @Provides
      @Singleton
      public static RealmConfiguration provideRealmConfiguration(RealmConstants realmConstants) {
          return new RealmConfiguration.Builder()
                  .name(realmConstants.getName())
                  .encryptionKey("Implement this key".getBytes())
                  .schemaVersion(realmConstants.getSchemaVersion())
                  .build();
      }
  
      @Provides
      @Singleton
      public static RealmManager provideRealmManager(RealmConfiguration realmConfiguration, SchedulerProvider schedulerProvider) {
          return new RealmManager(realmConfiguration, schedulerProvider);
      }
  
  }
  </code></pre>
  
  <p>I tried everything from google, but I don't know how to inject object from graph. </p>