Implemented a test to confirm correct behavior of issue #301

It seems that #301 can be closed in terms of new document persistence, here is a test case to confirm persistence works as expected.