More test cases to handle edge cases and security