Improved test case to cover node removals and content changes