add unit test to test the Schemadocument restoration

a registered SchemaDocument is restore as a new object instead of dict
so this tests test this feature