Testing Private Methods

It can be done using the Refletion API:

Method myMethod = MyClass.class.getDeclaredMethod("myMethod", ...);
myMethod.setAccessible(true);
 
myMethod.invoke(...);

For more information, see this tip I wrote