Add test cases for detecting changes