I have a method in which a local Service instance is provided by a static ServiceProvider which is injected by Koin
val apiService: MyService by inject { parametersOf(someStrings) }
How to mock this using the PowerMockito? The injection works with a ServiceProver class which looks something like this
object ServiceProvier { fun getMyServiceInstacne(..,..,..): MySerivce { .... .. return retrofit.create(MyService::class.java) } }
2.1m questions
2.1m answers
60 comments
57.0k users