Is there an alternate way of testing private methods other than using Reflection Mechanism in JUnit??? If we can test using Reflection Mechanism only, can i get a simple sample(nice rhyme ) code to do the same??? Thanks!!!
Make it (more) public so your test code can invoke the method.
You could also subclass the class under test and thus affect the accessibility of the private method.
Also, if you've got a private method that you'd like to test, it just might be a sign saying "please move me into a new class altogether and make me public over there"...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus