score:0

Accepted answer

Use a proper DI technique such as Cake (or even in simpler cases constructor parameter injection) and you have control over things that need to be done differently or take variant forms during testing.

score:0

As a heuristic, depending on where you make that call, you can probably fill-in a stacktrace exception and check if a specs2 method gets executed.


Related Query

More Query from same tag