How to Test Write Unit Tests Don't not write Tests Install Junit Commands are as follows: javac -Xlint -cp .:/usr/share/java/* YourTestClassName.java then java -cp .:/usr/share/java/* org.junit.runner.JUnitCore YourTestClassName