I am actually using kotlin-logging and this was more of a theoretical example because I can't share the actual code but the gist of it is that I have a singleton which contains a reference to something that writes externally and my object needs to call it in certain situations. I want to test that my object does in fact call that external thing in those conditions but I don't want to worry about the actual thing being called. In Java I would just inject a mock. Kotlin objects make that approach really difficult. I really want a singleton as I should only ever have a single instance of the external thing should I represent it as something other than an object or if this is a commonly used pattern how do folks test it.