If you wanted to do it manually, you could define ...
# getting-started
d
If you wanted to do it manually, you could define
Foo
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.