title: Koin Android Test
body: <p>I have a problem with Koin &amp; "androidTest".
  Because androidTest starts the Application i don't need to start Koin by myself in the test.</p>
  
  <p>Now i need to inject a mock service. The problem is, that i inject inside of a method with get() inside of a singleton class and this is not working via constructor injection because the injected object can have different implementations.</p>
  
  <p>My idea was to declare what i need this way:</p>
  
  <pre><code>declare {
          factory&lt;Webservice&gt;(override = true) { mockWebservice }
      }
  </code></pre>
  
  <p>But this will be applied on all tests. That's why an other test, which checks if the correct class was injected failed.</p>
  
  <p>I also tried to use stopKoin(), startKoin(listOf(appModule)) in the @After method, but with this the dependency injection doesn't work anymore in later tests.</p>
  
  <p>Is there a way to declare the mock only for one test?</p>