Strictly speaking, you're "supposed" to buckle down and stub out miles of interface method implementations that throw NotImplementedExceptions and this is absolutely a kludge. It's also a little more involved than I'd thought at first (I've been writing primarily Node for years and my Java is rusty):
Overall I can't recommend actually doing this purely for the sake of having something easily testable. If you're using an IDE (which is not a bad idea with Java), it can stub out an interface implementation for you. Java is verbose; you kind of just have to live with it.
Very helpful; it's definitely a lot of work but it seems like that may be the one plausible solution.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.