We have quite a few occasions when Injector.get(SomeClass.class) is used inside command.
Given that mockito can't mock static methods and power mock is not used, I wonder what
one should do when these usages have to be mocked in unit tests.
Funny enough, workarounds for this usage in my specific case include mocking constructor
(unsupported by mockito) and mocking superclass method (unsupported by mockito).
Also, why not to @Inject these instances in the first place?
Thanks,
Fedor
Show replies by date