Added 4 test cases for functions