Add test for attr_changes for complex object