added junit test case.