Add test for document recreation.