Improve document manipulation test.