added JUnit test cases