Moved the test for modify doc to a unit test