Adding tests to verify the fix