<How to mock a binding method in Dagger 2?> So, I'...
# stackoverflow
u
How to mock a binding method in Dagger 2? So, I'm trying to test my Dagger2 application with Espresso; to make quality tests I'm mocking some of the services using Mockito with DI. So far, I've been able to do it straight forward, until I had to mock a @Binds-annotated method and received this error: Binding methods may not be overridden in modules Am I misunderstanding something? What is the proper way to approach this? Here's a little example to help understand my situation: @Module(includes = [XBindingModule::class]) open class...