Added some functional test cases.