Hi Guys I'm writing unit test for my activity pres...
# kodein
m
Hi Guys I'm writing unit test for my activity presenter, I'm using a
BaseActivity
like
Copy code
abstract class BaseActivity: KodeinAppCompatActivity() {
and I have a presenter like
Copy code
class Presenter(foo : Foo, kodein: Lazy<Kodein>) : Presenter<ViewModel>(foo) {
    private val kodein = LazyKodein { kodein.value }

    val bar: Bar by kodein.instance()
I want to avoid to create the
bar
instance in the main activity and pass it as parameter for the
Presenter
, but I'd like to override the behaviour of the binding for
bar
as it's described in the doc so that I can
mock
it , but I'm passing an instance of
Lazy<KodeIn
so I'm kinda stuck, is there a better way?