Hi, I've already posted the same question in another thread [1], but I thought having a dedicated thread would increase its visibility.
Here is my problem. The new implementation of Beta.logBeta(double, double) I'm currently working on relies on several private methods through a rather complex branching. Due to this complicated branching, I find it much safer to have direct tests for these private methods, instead of relying on the tests of Beta.logBeta to validate these methods. Therefore, in order to preserve encapsulation (these private methods should really remain private, and not package private, as I previously did [2]), I propose to use reflection in the unit tests to access these private methods. I've tested this option locally, it seems to me that it is a viable option. What do you think about this compromise? Sébastien [1] http://markmail.org/thread/5wafabqjbrswbmv7 [2] Gilles was -- quite rightly -- not too happy about that!