dalexander
02/13/2018, 8:03 PMFoo
like Foo(private val logger: SomethingThatLogsInterface = SomeThingThatLogs())
using a default parameter so you normal code doesn’t change, and use that parameter to do your mock injection in your test code. You could do it manually, but if you are going to do it a lot, you might look into a library like Mockito.