Implemented JUnit test cases.