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) } }
1.4m articles
1.4m replys
5 comments
57.0k users