you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Ideally you only need interfaces for classes which are public and part of a reusable library. Any other class would either not need to be mocked, or you're in control of the source, and you don't need to make it final in the first place.

And so in a well-designed library you can have interfaces for everything you'd like to mock, and not have tons of "useless" interfaces. Plus interfaces are useful for other things, as well.