Added JUnit test cases.