Create an interface for the object, and use dependency injection instead of referring to the companion directly. In the tests you can inject a mock.
Create an interface for the object, and use dependency injection instead of referring to the companion directly. In the tests you can inject a mock.