JUnit Testing private variables? [duplicate]
This question already has answers here : How do I test a private function or a class that has private methods, fields or inner classes? (51 answers) I have been assigned the task of unit testing a class that I never worked directly on with JUnit, and am strictly forbidden to change the code in the package. This is usually no issue, since most of our unit testing is just for functionality and input/output consistency, which can be done simply by running routines and checking their return values. However, occasionally there is a need to check a private variable within the class, or directly edit