Test cases for critical functions