Fix test case and reduce modifying documents in test cases