It is a static method. You just need to implement a test method for JUnit using the method. What you want is to check whether it throws exception properly if something goes wrong. Also, you need to check if it can return what you want. That's all. Do you know how to use JUnit by the way?