Skip to content

Colin Webb

Tag: #java

How to JUnit Test a Private Method

I was recently writing a cache for MP3s at work, and I needed to test some private methods. Testing a private method in Java is doable using reflection.