added junit test cases.
junit test case.