Added test cases for helper functions