Want to unit test a private method in Java?
You could obviously change your methods access modifier from private. By making it public you’re breaking encapsulation and by making it protected you’re making your API less intuitive. Don’t do that.
Another way to go about this is to create a new class that’s extending the one with [...]