Added complete unit test cases.